Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/58867 )
Change subject: lib/thread: Use __func__ instead of repeating function name ......................................................................
lib/thread: Use __func__ instead of repeating function name
This cleans up the warning message:
WARNING: Prefer using '"%s...", __func__' to using 'thread_run', this function's name, in a string
BUG=b:179699789 TEST=boot guybrush
Signed-off-by: Raul E Rangel rrangel@chromium.org Change-Id: I85bacb7b2d9ebec40b6b05edc2ecf0ca1fc8ceee --- M src/lib/thread.c 1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/58867/1
diff --git a/src/lib/thread.c b/src/lib/thread.c index a075394..7d5cdc5 100644 --- a/src/lib/thread.c +++ b/src/lib/thread.c @@ -284,14 +284,14 @@
if (!thread_can_yield(current)) { printk(BIOS_ERR, - "ERROR: thread_run() called from non-yielding context!\n"); + "ERROR: %s() called from non-yielding context!\n", __func__); return -1; }
t = get_free_thread();
if (t == NULL) { - printk(BIOS_ERR, "ERROR: thread_run() No more threads!\n"); + printk(BIOS_ERR, "ERROR: %s: No more threads!\n", __func__); return -1; }
@@ -319,14 +319,14 @@
if (!thread_can_yield(current)) { printk(BIOS_ERR, - "ERROR: thread_run() called from non-yielding context!\n"); + "ERROR: %s() called from non-yielding context!\n", __func__); return -1; }
t = get_free_thread();
if (t == NULL) { - printk(BIOS_ERR, "ERROR: thread_run() No more threads!\n"); + printk(BIOS_ERR, "ERROR: %s: No more threads!\n", __func__); return -1; }