mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 07:02:34 +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:
parent
0d5db9a8f8
commit
04aa59a864
@ -68,7 +68,7 @@ int probe_82802ab(struct flashchip *flash)
|
||||
|
||||
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;
|
||||
|
@ -84,7 +84,7 @@ int probe_29f040b(struct flashchip *flash)
|
||||
|
||||
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;
|
||||
|
||||
|
@ -47,7 +47,7 @@ int probe_en29f512(struct flashchip *flash)
|
||||
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 @@ int probe_en29f002a(struct flashchip *flash)
|
||||
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;
|
||||
|
@ -285,7 +285,7 @@ int ft2232_spi_write_256(struct flashchip *flash, uint8_t *buf)
|
||||
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;
|
||||
}
|
||||
|
||||
|
8
ichspi.c
8
ichspi.c
@ -216,7 +216,7 @@ static int generate_opcodes(OPCODES * op)
|
||||
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 @@ static int generate_opcodes(OPCODES * op)
|
||||
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 @@ int program_opcodes(OPCODES * op)
|
||||
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 @@ static int run_opcode(OPCODE op, uint32_t offset,
|
||||
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 */
|
||||
|
@ -168,7 +168,7 @@ int it8716f_spi_send_command(unsigned int writecnt, unsigned int readcnt,
|
||||
} 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 @@ int it8716f_spi_send_command(unsigned int writecnt, unsigned int readcnt,
|
||||
break;
|
||||
default:
|
||||
printf("%s called with unsupported writecnt %i.\n",
|
||||
__FUNCTION__, writecnt);
|
||||
__func__, writecnt);
|
||||
return SPI_INVALID_LENGTH;
|
||||
}
|
||||
/*
|
||||
|
2
jedec.c
2
jedec.c
@ -145,7 +145,7 @@ int probe_jedec(struct flashchip *flash)
|
||||
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");
|
||||
|
||||
|
@ -75,7 +75,7 @@ int probe_m29f400bt(struct flashchip *flash)
|
||||
|
||||
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;
|
||||
|
@ -36,7 +36,7 @@ int probe_29f002(struct flashchip *flash)
|
||||
|
||||
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;
|
||||
|
||||
|
@ -60,7 +60,7 @@ int probe_lhf00l04(struct flashchip *flash)
|
||||
|
||||
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;
|
||||
|
6
spi.c
6
spi.c
@ -264,7 +264,7 @@ static int probe_spi_rdid_generic(struct flashchip *flash, int bytes)
|
||||
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 @@ int probe_spi_rems(struct flashchip *flash)
|
||||
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 @@ int probe_spi_res(struct flashchip *flash)
|
||||
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;
|
||||
|
||||
|
@ -111,7 +111,7 @@ int probe_28sf040(struct flashchip *flash)
|
||||
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;
|
||||
|
||||
|
@ -141,7 +141,7 @@ int probe_49lfxxxc(struct flashchip *flash)
|
||||
|
||||
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;
|
||||
|
@ -80,7 +80,7 @@ int probe_stm50flw0x0x(struct flashchip *flash)
|
||||
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)
|
||||
|
@ -61,7 +61,7 @@ int probe_w29ee011(struct flashchip *flash)
|
||||
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;
|
||||
|
@ -41,7 +41,7 @@ int probe_winbond_fwhub(struct flashchip *flash)
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user