Author: uwe
Date: 2009-09-03 00:09:00 +0200 (Thu, 03 Sep 2009)
New Revision: 711
Modified:
trunk/82802ab.c
trunk/am29f040b.c
trunk/en29f002a.c
trunk/ft2232_spi.c
trunk/ichspi.c
trunk/it87spi.c
trunk/jedec.c
trunk/m29f400bt.c
trunk/mx29f002.c
trunk/sharplhf00l04.c
trunk/spi.c
trunk/sst28sf040.c
trunk/sst49lfxxxc.c
trunk/stm50flw0x0x.c
trunk/w29ee011.c
trunk/w39v080fa.c
Log:
Standardize on using __func__ instead of __FUNCTION__.
The __func__ variant is standardized in C99 and recommended to be
used instead of __FUNCTION__ in the gcc info page.
Only _very_ old versions of gcc did not know about __func__, but we've
been using both __func__ and __FUNCTION__ for a long while now, and
nobody complained about this, so all our users seem to use recent
enough compilers.
Signed-off-by: Uwe Hermann <uwe(a)hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan(a)coresystems.de>
Modified: trunk/82802ab.c
===================================================================
--- trunk/82802ab.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/82802ab.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -68,7 +68,7 @@
programmer_delay(10);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
if (id1 != flash->manufacture_id || id2 != flash->model_id)
return 0;
Modified: trunk/am29f040b.c
===================================================================
--- trunk/am29f040b.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/am29f040b.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -84,7 +84,7 @@
programmer_delay(10);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1;
Modified: trunk/en29f002a.c
===================================================================
--- trunk/en29f002a.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/en29f002a.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -47,7 +47,7 @@
chip_writeb(0x55, bios + 0x2AA);
chip_writeb(0xF0, bios + 0x555);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1;
@@ -80,7 +80,7 @@
chip_writeb(0x55, bios + 0xAAA);
chip_writeb(0xF0, bios + 0x555);
- printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%x, id2 0x%x\n", __func__, id1, id2);
if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1;
Modified: trunk/ft2232_spi.c
===================================================================
--- trunk/ft2232_spi.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/ft2232_spi.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -285,7 +285,7 @@
l = total_size - i;
if ((r = spi_nbyte_program(i, &buf[i], l))) {
- fprintf(stderr, "%s: write fail %d\n", __FUNCTION__, r);
+ fprintf(stderr, "%s: write fail %d\n", __func__, r);
return 1;
}
Modified: trunk/ichspi.c
===================================================================
--- trunk/ichspi.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/ichspi.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -216,7 +216,7 @@
uint32_t opmenu[2];
if (op == NULL) {
- printf_debug("\n%s: null OPCODES pointer!\n", __FUNCTION__);
+ printf_debug("\n%s: null OPCODES pointer!\n", __func__);
return -1;
}
@@ -235,7 +235,7 @@
opmenu[1] = REGREAD32(ICH9_REG_OPMENU + 4);
break;
default:
- printf_debug("%s: unsupported chipset\n", __FUNCTION__);
+ printf_debug("%s: unsupported chipset\n", __func__);
return -1;
}
@@ -317,7 +317,7 @@
REGWRITE32(ICH9_REG_OPMENU + 4, opmenu[1]);
break;
default:
- printf_debug("%s: unsupported chipset\n", __FUNCTION__);
+ printf_debug("%s: unsupported chipset\n", __func__);
return -1;
}
@@ -610,7 +610,7 @@
return SPI_INVALID_LENGTH;
return ich9_run_opcode(op, offset, datalength, data);
default:
- printf_debug("%s: unsupported chipset\n", __FUNCTION__);
+ printf_debug("%s: unsupported chipset\n", __func__);
}
/* If we ever get here, something really weird happened */
Modified: trunk/it87spi.c
===================================================================
--- trunk/it87spi.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/it87spi.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -168,7 +168,7 @@
} while (busy);
if (readcnt > 3) {
printf("%s called with unsupported readcnt %i.\n",
- __FUNCTION__, readcnt);
+ __func__, readcnt);
return SPI_INVALID_LENGTH;
}
switch (writecnt) {
@@ -198,7 +198,7 @@
break;
default:
printf("%s called with unsupported writecnt %i.\n",
- __FUNCTION__, writecnt);
+ __func__, writecnt);
return SPI_INVALID_LENGTH;
}
/*
Modified: trunk/jedec.c
===================================================================
--- trunk/jedec.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/jedec.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -145,7 +145,7 @@
chip_writeb(0xF0, bios + 0x5555);
programmer_delay(probe_timing_exit);
- printf_debug("%s: id1 0x%02x, id2 0x%02x", __FUNCTION__, largeid1, largeid2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x", __func__, largeid1, largeid2);
if (!oddparity(id1))
printf_debug(", id1 parity violation");
Modified: trunk/m29f400bt.c
===================================================================
--- trunk/m29f400bt.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/m29f400bt.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -75,7 +75,7 @@
programmer_delay(10);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1;
Modified: trunk/mx29f002.c
===================================================================
--- trunk/mx29f002.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/mx29f002.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -36,7 +36,7 @@
programmer_delay(10);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1;
Modified: trunk/sharplhf00l04.c
===================================================================
--- trunk/sharplhf00l04.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/sharplhf00l04.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -60,7 +60,7 @@
programmer_delay(10);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
if (id1 != flash->manufacture_id || id2 != flash->model_id)
return 0;
Modified: trunk/spi.c
===================================================================
--- trunk/spi.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/spi.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -264,7 +264,7 @@
id2 = (readarr[1] << 8) | readarr[2];
}
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
if (id1 == flash->manufacture_id && id2 == flash->model_id) {
/* Print the status register to tell the
@@ -321,7 +321,7 @@
id1 = readarr[0];
id2 = readarr[1];
- printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%x, id2 0x%x\n", __func__, id1, id2);
if (id1 == flash->manufacture_id && id2 == flash->model_id) {
/* Print the status register to tell the
@@ -356,7 +356,7 @@
return 0;
id2 = readarr[0];
- printf_debug("%s: id 0x%x\n", __FUNCTION__, id2);
+ printf_debug("%s: id 0x%x\n", __func__, id2);
if (id2 != flash->model_id)
return 0;
Modified: trunk/sst28sf040.c
===================================================================
--- trunk/sst28sf040.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/sst28sf040.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -111,7 +111,7 @@
chip_writeb(RESET, bios);
programmer_delay(10);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1;
Modified: trunk/sst49lfxxxc.c
===================================================================
--- trunk/sst49lfxxxc.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/sst49lfxxxc.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -141,7 +141,7 @@
chip_writeb(RESET, bios);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
if (!(id1 == flash->manufacture_id && id2 == flash->model_id))
return 0;
Modified: trunk/stm50flw0x0x.c
===================================================================
--- trunk/stm50flw0x0x.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/stm50flw0x0x.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -80,7 +80,7 @@
chip_writeb(0xF0, bios + 0x5555);
programmer_delay(40);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, largeid1,
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, largeid1,
largeid2);
if (largeid1 != flash->manufacture_id || largeid2 != flash->model_id)
Modified: trunk/w29ee011.c
===================================================================
--- trunk/w29ee011.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/w29ee011.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -61,7 +61,7 @@
chip_writeb(0xF0, bios + 0x5555);
programmer_delay(10);
- printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1;
Modified: trunk/w39v080fa.c
===================================================================
--- trunk/w39v080fa.c 2009-09-02 13:53:56 UTC (rev 710)
+++ trunk/w39v080fa.c 2009-09-02 22:09:00 UTC (rev 711)
@@ -41,7 +41,7 @@
chip_writeb(0xF0, bios + 0x5555);
programmer_delay(10);
- printf_debug("%s: id1 0x%x, id2 0x%x\n", __FUNCTION__, id1, id2);
+ printf_debug("%s: id1 0x%x, id2 0x%x\n", __func__, id1, id2);
if (id1 != flash->manufacture_id || id2 != flash->model_id)
return 0;