1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 15:12:36 +02:00

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.

Corresponding to flashrom svn r711.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
This commit is contained in:
Uwe Hermann 2009-09-02 22:09:00 +00:00
parent 0d5db9a8f8
commit 04aa59a864
16 changed files with 23 additions and 23 deletions

View File

@ -68,7 +68,7 @@ int probe_82802ab(struct flashchip *flash)
programmer_delay(10); 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) if (id1 != flash->manufacture_id || id2 != flash->model_id)
return 0; return 0;

View File

@ -84,7 +84,7 @@ int probe_29f040b(struct flashchip *flash)
programmer_delay(10); 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) if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1; return 1;

View File

@ -47,7 +47,7 @@ int probe_en29f512(struct flashchip *flash)
chip_writeb(0x55, bios + 0x2AA); chip_writeb(0x55, bios + 0x2AA);
chip_writeb(0xF0, bios + 0x555); 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) if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1; return 1;
@ -80,7 +80,7 @@ int probe_en29f002a(struct flashchip *flash)
chip_writeb(0x55, bios + 0xAAA); chip_writeb(0x55, bios + 0xAAA);
chip_writeb(0xF0, bios + 0x555); 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) if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1; return 1;

View File

@ -285,7 +285,7 @@ int ft2232_spi_write_256(struct flashchip *flash, uint8_t *buf)
l = total_size - i; l = total_size - i;
if ((r = spi_nbyte_program(i, &buf[i], l))) { 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; return 1;
} }

View File

@ -216,7 +216,7 @@ static int generate_opcodes(OPCODES * op)
uint32_t opmenu[2]; uint32_t opmenu[2];
if (op == NULL) { if (op == NULL) {
printf_debug("\n%s: null OPCODES pointer!\n", __FUNCTION__); printf_debug("\n%s: null OPCODES pointer!\n", __func__);
return -1; return -1;
} }
@ -235,7 +235,7 @@ static int generate_opcodes(OPCODES * op)
opmenu[1] = REGREAD32(ICH9_REG_OPMENU + 4); opmenu[1] = REGREAD32(ICH9_REG_OPMENU + 4);
break; break;
default: default:
printf_debug("%s: unsupported chipset\n", __FUNCTION__); printf_debug("%s: unsupported chipset\n", __func__);
return -1; return -1;
} }
@ -317,7 +317,7 @@ int program_opcodes(OPCODES * op)
REGWRITE32(ICH9_REG_OPMENU + 4, opmenu[1]); REGWRITE32(ICH9_REG_OPMENU + 4, opmenu[1]);
break; break;
default: default:
printf_debug("%s: unsupported chipset\n", __FUNCTION__); printf_debug("%s: unsupported chipset\n", __func__);
return -1; return -1;
} }
@ -610,7 +610,7 @@ static int run_opcode(OPCODE op, uint32_t offset,
return SPI_INVALID_LENGTH; return SPI_INVALID_LENGTH;
return ich9_run_opcode(op, offset, datalength, data); return ich9_run_opcode(op, offset, datalength, data);
default: default:
printf_debug("%s: unsupported chipset\n", __FUNCTION__); printf_debug("%s: unsupported chipset\n", __func__);
} }
/* If we ever get here, something really weird happened */ /* If we ever get here, something really weird happened */

View File

@ -168,7 +168,7 @@ int it8716f_spi_send_command(unsigned int writecnt, unsigned int readcnt,
} while (busy); } while (busy);
if (readcnt > 3) { if (readcnt > 3) {
printf("%s called with unsupported readcnt %i.\n", printf("%s called with unsupported readcnt %i.\n",
__FUNCTION__, readcnt); __func__, readcnt);
return SPI_INVALID_LENGTH; return SPI_INVALID_LENGTH;
} }
switch (writecnt) { switch (writecnt) {
@ -198,7 +198,7 @@ int it8716f_spi_send_command(unsigned int writecnt, unsigned int readcnt,
break; break;
default: default:
printf("%s called with unsupported writecnt %i.\n", printf("%s called with unsupported writecnt %i.\n",
__FUNCTION__, writecnt); __func__, writecnt);
return SPI_INVALID_LENGTH; return SPI_INVALID_LENGTH;
} }
/* /*

View File

@ -145,7 +145,7 @@ int probe_jedec(struct flashchip *flash)
chip_writeb(0xF0, bios + 0x5555); chip_writeb(0xF0, bios + 0x5555);
programmer_delay(probe_timing_exit); 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)) if (!oddparity(id1))
printf_debug(", id1 parity violation"); printf_debug(", id1 parity violation");

View File

@ -75,7 +75,7 @@ int probe_m29f400bt(struct flashchip *flash)
programmer_delay(10); 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) if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1; return 1;

View File

@ -36,7 +36,7 @@ int probe_29f002(struct flashchip *flash)
programmer_delay(10); 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) if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1; return 1;

View File

@ -60,7 +60,7 @@ int probe_lhf00l04(struct flashchip *flash)
programmer_delay(10); 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) if (id1 != flash->manufacture_id || id2 != flash->model_id)
return 0; return 0;

6
spi.c
View File

@ -264,7 +264,7 @@ static int probe_spi_rdid_generic(struct flashchip *flash, int bytes)
id2 = (readarr[1] << 8) | readarr[2]; 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) { if (id1 == flash->manufacture_id && id2 == flash->model_id) {
/* Print the status register to tell the /* Print the status register to tell the
@ -321,7 +321,7 @@ int probe_spi_rems(struct flashchip *flash)
id1 = readarr[0]; id1 = readarr[0];
id2 = readarr[1]; 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) { if (id1 == flash->manufacture_id && id2 == flash->model_id) {
/* Print the status register to tell the /* Print the status register to tell the
@ -356,7 +356,7 @@ int probe_spi_res(struct flashchip *flash)
return 0; return 0;
id2 = readarr[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) if (id2 != flash->model_id)
return 0; return 0;

View File

@ -111,7 +111,7 @@ int probe_28sf040(struct flashchip *flash)
chip_writeb(RESET, bios); chip_writeb(RESET, bios);
programmer_delay(10); 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) if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1; return 1;

View File

@ -141,7 +141,7 @@ int probe_49lfxxxc(struct flashchip *flash)
chip_writeb(RESET, bios); 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)) if (!(id1 == flash->manufacture_id && id2 == flash->model_id))
return 0; return 0;

View File

@ -80,7 +80,7 @@ int probe_stm50flw0x0x(struct flashchip *flash)
chip_writeb(0xF0, bios + 0x5555); chip_writeb(0xF0, bios + 0x5555);
programmer_delay(40); 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); largeid2);
if (largeid1 != flash->manufacture_id || largeid2 != flash->model_id) if (largeid1 != flash->manufacture_id || largeid2 != flash->model_id)

View File

@ -61,7 +61,7 @@ int probe_w29ee011(struct flashchip *flash)
chip_writeb(0xF0, bios + 0x5555); chip_writeb(0xF0, bios + 0x5555);
programmer_delay(10); 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) if (id1 == flash->manufacture_id && id2 == flash->model_id)
return 1; return 1;

View File

@ -41,7 +41,7 @@ int probe_winbond_fwhub(struct flashchip *flash)
chip_writeb(0xF0, bios + 0x5555); chip_writeb(0xF0, bios + 0x5555);
programmer_delay(10); 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) if (id1 != flash->manufacture_id || id2 != flash->model_id)
return 0; return 0;