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>
This commit is contained in:
parent
ba51e29953
commit
58618c26a1
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue