tree: Use __func__ instead of hard-coded names
Change-Id: I87e383ce2f28340dbc3c843dbf2ed0e47c00a723 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72382 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
parent
3a54f4a7f1
commit
39efcd1ba6
|
@ -29,8 +29,7 @@ static FILE *previous_file = NULL;
|
||||||
static FILE *fopen(const char *path, const char *mode)
|
static FILE *fopen(const char *path, const char *mode)
|
||||||
{
|
{
|
||||||
#if CONFIG(DEBUG_COVERAGE)
|
#if CONFIG(DEBUG_COVERAGE)
|
||||||
printk(BIOS_DEBUG, "fopen %s with mode %s\n",
|
printk(BIOS_DEBUG, "%s %s with mode %s\n", __func__, path, mode);
|
||||||
path, mode);
|
|
||||||
#endif
|
#endif
|
||||||
if (!current_file) {
|
if (!current_file) {
|
||||||
current_file = cbmem_add(CBMEM_ID_COVERAGE, 32*1024);
|
current_file = cbmem_add(CBMEM_ID_COVERAGE, 32*1024);
|
||||||
|
@ -62,7 +61,7 @@ static FILE *fopen(const char *path, const char *mode)
|
||||||
static int fclose(FILE *stream)
|
static int fclose(FILE *stream)
|
||||||
{
|
{
|
||||||
#if CONFIG(DEBUG_COVERAGE)
|
#if CONFIG(DEBUG_COVERAGE)
|
||||||
printk(BIOS_DEBUG, "fclose %s\n", stream->filename);
|
printk(BIOS_DEBUG, "%s %s\n", __func__, stream->filename);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -73,8 +72,8 @@ static int fseek(FILE *stream, long offset, int whence)
|
||||||
* to a freshly opened file. */
|
* to a freshly opened file. */
|
||||||
gcc_assert(offset == 0 && whence == SEEK_SET);
|
gcc_assert(offset == 0 && whence == SEEK_SET);
|
||||||
#if CONFIG(DEBUG_COVERAGE)
|
#if CONFIG(DEBUG_COVERAGE)
|
||||||
printk(BIOS_DEBUG, "fseek %s offset=%ld whence=%d\n",
|
printk(BIOS_DEBUG, "%s %s offset=%ld whence=%d\n",
|
||||||
stream->filename, offset, whence);
|
__func__, stream->filename, offset, whence);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +83,7 @@ static long ftell(FILE *stream)
|
||||||
/* ftell should currently not be called */
|
/* ftell should currently not be called */
|
||||||
BUG();
|
BUG();
|
||||||
#if CONFIG(DEBUG_COVERAGE)
|
#if CONFIG(DEBUG_COVERAGE)
|
||||||
printk(BIOS_DEBUG, "ftell %s\n", stream->filename);
|
printk(BIOS_DEBUG, "%s %s\n", __func__, stream->filename);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -92,8 +91,8 @@ static long ftell(FILE *stream)
|
||||||
static size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
|
static size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
|
||||||
{
|
{
|
||||||
#if CONFIG(DEBUG_COVERAGE)
|
#if CONFIG(DEBUG_COVERAGE)
|
||||||
printk(BIOS_DEBUG, "fread: ptr=%p size=%zd nmemb=%zd FILE*=%p\n",
|
printk(BIOS_DEBUG, "%s: ptr=%p size=%zd nmemb=%zd FILE*=%p\n",
|
||||||
ptr, size, nmemb, stream);
|
__func__, ptr, size, nmemb, stream);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -101,8 +100,8 @@ static size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
|
||||||
static size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
|
static size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
|
||||||
{
|
{
|
||||||
#if CONFIG(DEBUG_COVERAGE)
|
#if CONFIG(DEBUG_COVERAGE)
|
||||||
printk(BIOS_DEBUG, "fwrite: %zd * %zd bytes to file %s\n",
|
printk(BIOS_DEBUG, "%s: %zd * %zd bytes to file %s\n",
|
||||||
nmemb, size, stream->filename);
|
__func__, nmemb, size, stream->filename);
|
||||||
#endif
|
#endif
|
||||||
// TODO check if file is last opened file and fail otherwise.
|
// TODO check if file is last opened file and fail otherwise.
|
||||||
|
|
||||||
|
|
|
@ -38,16 +38,16 @@ void *memalign(size_t boundary, size_t size)
|
||||||
free_last_alloc_ptr = p;
|
free_last_alloc_ptr = p;
|
||||||
|
|
||||||
if (free_mem_ptr >= free_mem_end_ptr) {
|
if (free_mem_ptr >= free_mem_end_ptr) {
|
||||||
printk(BIOS_ERR, "memalign(boundary=%zu, size=%zu): failed: ",
|
printk(BIOS_ERR, "%s(boundary=%zu, size=%zu): failed: ",
|
||||||
boundary, size);
|
__func__, boundary, size);
|
||||||
printk(BIOS_ERR, "Tried to round up free_mem_ptr %p to %p\n",
|
printk(BIOS_ERR, "Tried to round up free_mem_ptr %p to %p\n",
|
||||||
p, free_mem_ptr);
|
p, free_mem_ptr);
|
||||||
printk(BIOS_ERR, "but free_mem_end_ptr is %p\n",
|
printk(BIOS_ERR, "but free_mem_end_ptr is %p\n",
|
||||||
free_mem_end_ptr);
|
free_mem_end_ptr);
|
||||||
die("Error! memalign: Out of memory (free_mem_ptr >= free_mem_end_ptr)");
|
die("Error! %s: Out of memory (free_mem_ptr >= free_mem_end_ptr)", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
MALLOCDBG("memalign %p\n", p);
|
MALLOCDBG("%s %p\n", __func__, p);
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ void mainboard_ec_init(void)
|
||||||
|
|
||||||
int s3_wakeup = acpi_is_wakeup_s3();
|
int s3_wakeup = acpi_is_wakeup_s3();
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "mainboard_ec_init\n");
|
printk(BIOS_DEBUG, "%s\n", __func__);
|
||||||
post_code(0xf0);
|
post_code(0xf0);
|
||||||
|
|
||||||
google_chromeec_events_init(&info, s3_wakeup);
|
google_chromeec_events_init(&info, s3_wakeup);
|
||||||
|
|
|
@ -14,7 +14,7 @@ void mainboard_ec_init(void)
|
||||||
.s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS,
|
.s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS,
|
||||||
};
|
};
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "mainboard_ec_init\n");
|
printk(BIOS_DEBUG, "%s\n", __func__);
|
||||||
post_code(0xf0);
|
post_code(0xf0);
|
||||||
|
|
||||||
google_chromeec_events_init(&info, acpi_is_wakeup_s3());
|
google_chromeec_events_init(&info, acpi_is_wakeup_s3());
|
||||||
|
|
|
@ -14,7 +14,7 @@ void link_ec_init(void)
|
||||||
.s5_wake_events = LINK_EC_S5_WAKE_EVENTS,
|
.s5_wake_events = LINK_EC_S5_WAKE_EVENTS,
|
||||||
};
|
};
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "link_ec_init\n");
|
printk(BIOS_DEBUG, "%s\n", __func__);
|
||||||
post_code(0xf0);
|
post_code(0xf0);
|
||||||
|
|
||||||
google_chromeec_events_init(&info, acpi_is_wakeup_s3());
|
google_chromeec_events_init(&info, acpi_is_wakeup_s3());
|
||||||
|
|
|
@ -173,13 +173,13 @@ static void simple_spi_test(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rdev_readat(boot_dev, data, 0, amt) < amt) {
|
if (rdev_readat(boot_dev, data, 0, amt) < amt) {
|
||||||
printk(BIOS_SPEW, "simple_spi_test fails\n");
|
printk(BIOS_SPEW, "%s fails\n", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < amt; i += 4){
|
for (i = 0; i < amt; i += 4){
|
||||||
if (rdev_readat(boot_dev, &in, i, 4) < 4) {
|
if (rdev_readat(boot_dev, &in, i, 4) < 4) {
|
||||||
printk(BIOS_SPEW, "simple_spi_test fails at %d\n", i);
|
printk(BIOS_SPEW, "%s fails at %d\n", __func__, i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (data[i/4] != in){
|
if (data[i/4] != in){
|
||||||
|
@ -188,7 +188,7 @@ static void simple_spi_test(void)
|
||||||
i, &data[i/4], (unsigned long)data[i/4], (unsigned long)in);
|
i, &data[i/4], (unsigned long)data[i/4], (unsigned long)in);
|
||||||
/* reread it to see which is wrong. */
|
/* reread it to see which is wrong. */
|
||||||
if (rdev_readat(boot_dev, &in, i, 4) < 4) {
|
if (rdev_readat(boot_dev, &in, i, 4) < 4) {
|
||||||
printk(BIOS_SPEW, "simple_spi_test fails at %d\n", i);
|
printk(BIOS_SPEW, "%s fails at %d\n", __func__, i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printk(BIOS_SPEW, "RTRY at %d(%p):\nRAM %08lx\nSPI %08lx\n",
|
printk(BIOS_SPEW, "RTRY at %d(%p):\nRAM %08lx\nSPI %08lx\n",
|
||||||
|
|
|
@ -16,7 +16,7 @@ void mainboard_ec_init(void)
|
||||||
.s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS,
|
.s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS,
|
||||||
};
|
};
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "mainboard_ec_init\n");
|
printk(BIOS_DEBUG, "%s\n", __func__);
|
||||||
post_code(0xf0);
|
post_code(0xf0);
|
||||||
|
|
||||||
google_chromeec_events_init(&info, s3_wakeup);
|
google_chromeec_events_init(&info, s3_wakeup);
|
||||||
|
|
|
@ -16,7 +16,7 @@ void mainboard_ec_init(void)
|
||||||
|
|
||||||
int s3_wakeup = acpi_is_wakeup_s3();
|
int s3_wakeup = acpi_is_wakeup_s3();
|
||||||
|
|
||||||
printk(BIOS_DEBUG, "mainboard_ec_init\n");
|
printk(BIOS_DEBUG, "%s\n", __func__);
|
||||||
post_code(0xf0);
|
post_code(0xf0);
|
||||||
|
|
||||||
google_chromeec_events_init(&info, s3_wakeup);
|
google_chromeec_events_init(&info, s3_wakeup);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
void lumpy_ec_init(void)
|
void lumpy_ec_init(void)
|
||||||
{
|
{
|
||||||
printk(BIOS_DEBUG, "lumpy_ec_init\n");
|
printk(BIOS_DEBUG, "%s\n", __func__);
|
||||||
|
|
||||||
if (acpi_is_wakeup_s3())
|
if (acpi_is_wakeup_s3())
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue