Replace all occurances of __FUNCTION__ with __func__
Replace all occurs of __FUNCTION__ except for the check in checkpatch
with the non GCC specific __func__.
One line in hcd-musb.c was manually tweaked to pass checkpatch.
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
[THH: Removed hunks related to pxa2xx_mmci.c (fixed already)]
Signed-off-by: Thomas Huth <thuth@redhat.com>
diff --git a/hw/misc/cbus.c b/hw/misc/cbus.c
index 677274c..25e337e 100644
--- a/hw/misc/cbus.c
+++ b/hw/misc/cbus.c
@@ -62,7 +62,7 @@
s->slave[s->addr]->io(s->slave[s->addr]->opaque,
s->rw, s->reg, &s->val);
else
- hw_error("%s: bad slave address %i\n", __FUNCTION__, s->addr);
+ hw_error("%s: bad slave address %i\n", __func__, s->addr);
}
static void cbus_cycle(CBusPriv *s)
@@ -299,7 +299,7 @@
return 0x0000;
default:
- hw_error("%s: bad register %02x\n", __FUNCTION__, reg);
+ hw_error("%s: bad register %02x\n", __func__, reg);
}
}
@@ -372,7 +372,7 @@
break;
default:
- hw_error("%s: bad register %02x\n", __FUNCTION__, reg);
+ hw_error("%s: bad register %02x\n", __func__, reg);
}
}
@@ -538,7 +538,7 @@
return 0x0000;
default:
- hw_error("%s: bad register %02x\n", __FUNCTION__, reg);
+ hw_error("%s: bad register %02x\n", __func__, reg);
}
}
@@ -567,7 +567,7 @@
if (s->backlight != (val & 0x7f)) {
s->backlight = val & 0x7f;
printf("%s: LCD backlight now at %i / 127\n",
- __FUNCTION__, s->backlight);
+ __func__, s->backlight);
}
break;
@@ -588,7 +588,7 @@
break;
default:
- hw_error("%s: bad register %02x\n", __FUNCTION__, reg);
+ hw_error("%s: bad register %02x\n", __func__, reg);
}
}
diff --git a/hw/misc/omap_clk.c b/hw/misc/omap_clk.c
index 19151d0..9ea1418 100644
--- a/hw/misc/omap_clk.c
+++ b/hw/misc/omap_clk.c
@@ -1109,7 +1109,7 @@
for (i = mpu->clks; i->name; i ++)
if (!strcmp(i->name, name) || (i->alias && !strcmp(i->alias, name)))
return i;
- hw_error("%s: %s not found\n", __FUNCTION__, name);
+ hw_error("%s: %s not found\n", __func__, name);
}
void omap_clk_get(struct clk *clk)
@@ -1120,7 +1120,7 @@
void omap_clk_put(struct clk *clk)
{
if (!(clk->usecount --))
- hw_error("%s: %s is not in use\n", __FUNCTION__, clk->name);
+ hw_error("%s: %s is not in use\n", __func__, clk->name);
}
static void omap_clk_update(struct clk *clk)
diff --git a/hw/misc/omap_gpmc.c b/hw/misc/omap_gpmc.c
index 67d8e2f..84f9e4c 100644
--- a/hw/misc/omap_gpmc.c
+++ b/hw/misc/omap_gpmc.c
@@ -643,7 +643,7 @@
case 0x010: /* GPMC_SYSCONFIG */
if ((value >> 3) == 0x3)
fprintf(stderr, "%s: bad SDRAM idle mode %"PRIi64"\n",
- __FUNCTION__, value >> 3);
+ __func__, value >> 3);
if (value & 2)
omap_gpmc_reset(s);
s->sysconfig = value & 0x19;
@@ -806,7 +806,7 @@
break;
case 0x230: /* GPMC_TESTMODE_CTRL */
if (value & 7)
- fprintf(stderr, "%s: test mode enable attempt\n", __FUNCTION__);
+ fprintf(stderr, "%s: test mode enable attempt\n", __func__);
break;
default:
@@ -864,7 +864,7 @@
assert(iomem);
if (cs < 0 || cs >= 8) {
- fprintf(stderr, "%s: bad chip-select %i\n", __FUNCTION__, cs);
+ fprintf(stderr, "%s: bad chip-select %i\n", __func__, cs);
exit(-1);
}
f = &s->cs_file[cs];
diff --git a/hw/misc/omap_l4.c b/hw/misc/omap_l4.c
index 88c533a..96fc057 100644
--- a/hw/misc/omap_l4.c
+++ b/hw/misc/omap_l4.c
@@ -126,7 +126,7 @@
break;
}
if (!ta) {
- fprintf(stderr, "%s: bad target agent (%i)\n", __FUNCTION__, cs);
+ fprintf(stderr, "%s: bad target agent (%i)\n", __func__, cs);
exit(-1);
}
@@ -151,7 +151,7 @@
hwaddr base;
if (region < 0 || region >= ta->regions) {
- fprintf(stderr, "%s: bad io region (%i)\n", __FUNCTION__, region);
+ fprintf(stderr, "%s: bad io region (%i)\n", __func__, region);
exit(-1);
}
diff --git a/hw/misc/omap_sdrc.c b/hw/misc/omap_sdrc.c
index dff37ec..7b38c55 100644
--- a/hw/misc/omap_sdrc.c
+++ b/hw/misc/omap_sdrc.c
@@ -109,7 +109,7 @@
case 0x10: /* SDRC_SYSCONFIG */
if ((value >> 3) != 0x2)
fprintf(stderr, "%s: bad SDRAM idle mode %i\n",
- __FUNCTION__, (unsigned)value >> 3);
+ __func__, (unsigned)value >> 3);
if (value & 2)
omap_sdrc_reset(s);
s->config = value & 0x18;
diff --git a/hw/misc/omap_tap.c b/hw/misc/omap_tap.c
index e6ea8ee..3f595e8 100644
--- a/hw/misc/omap_tap.c
+++ b/hw/misc/omap_tap.c
@@ -44,7 +44,7 @@
case omap3430:
return 0x1b7ae02f; /* ES 2 */
default:
- hw_error("%s: Bad mpu model\n", __FUNCTION__);
+ hw_error("%s: Bad mpu model\n", __func__);
}
case 0x208: /* PRODUCTION_ID_reg for OMAP2 */
@@ -61,7 +61,7 @@
case omap3430:
return 0x000000f0;
default:
- hw_error("%s: Bad mpu model\n", __FUNCTION__);
+ hw_error("%s: Bad mpu model\n", __func__);
}
case 0x20c:
@@ -75,7 +75,7 @@
case omap3430:
return 0xcafeb7ae; /* ES 2 */
default:
- hw_error("%s: Bad mpu model\n", __FUNCTION__);
+ hw_error("%s: Bad mpu model\n", __func__);
}
case 0x218: /* DIE_ID_reg */
diff --git a/hw/misc/tmp105.c b/hw/misc/tmp105.c
index 04e8378..9e22d64 100644
--- a/hw/misc/tmp105.c
+++ b/hw/misc/tmp105.c
@@ -131,7 +131,7 @@
case TMP105_REG_CONFIG:
if (s->buf[0] & ~s->config & (1 << 0)) /* SD */
- printf("%s: TMP105 shutdown\n", __FUNCTION__);
+ printf("%s: TMP105 shutdown\n", __func__);
s->config = s->buf[0];
s->faults = tmp105_faultq[(s->config >> 3) & 3]; /* F */
tmp105_alarm_update(s);