summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-11-02 13:45:16 -0600
committerRaul Rangel <rrangel@chromium.org>2021-11-04 17:04:26 +0000
commit58618c26a10632a98ee7f8be957ba5288a39af69 (patch)
treee1d1161e6672b7b7aeb0e63e9231541cfc12f614 /src
parentba51e29953d0ac2534146363e0be08ab1394dee2 (diff)
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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58867 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Rob Barnes <robbarnes@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/thread.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/thread.c b/src/lib/thread.c
index a07539415f..7d5cdc5b8e 100644
--- a/src/lib/thread.c
+++ b/src/lib/thread.c
@@ -284,14 +284,14 @@ int thread_run(struct thread_handle *handle, enum cb_err (*func)(void *), void *
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 @@ int thread_run_until(struct thread_handle *handle, enum cb_err (*func)(void *),
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;
}