diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-02-02 14:34:15 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-02-03 08:59:46 +0100 |
commit | b885cfc731c710eaf1efd55211b4b62fa5ade166 (patch) | |
tree | 4a9f1849658990a57383cc8bbdc419a2ca3fbbde /lib/list_sort.c | |
parent | b58bffa85df81a32a6bdf3d732dc8987834ba83f (diff) | |
download | barebox-b885cfc731c710eaf1efd55211b4b62fa5ade166.tar.gz barebox-b885cfc731c710eaf1efd55211b4b62fa5ade166.tar.xz |
include: printk: retire printk_once for pr_debug_once
printk is just printf and KERN_DEBUG is just "", so printk_once(KERN_DEBUG
doesn't do what's promised. Replace instead with pr_debug_once, which
does what one would expect.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230202133415.319020-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib/list_sort.c')
-rw-r--r-- | lib/list_sort.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/list_sort.c b/lib/list_sort.c index 77ddadb3d6..eea87f834c 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -4,6 +4,7 @@ #include <linux/kernel.h> #define EXPORT_SYMBOL(x) #else +#define pr_fmt(fmt) "list_sort: " fmt #include <common.h> #include <malloc.h> #endif @@ -129,9 +130,7 @@ void list_sort(void *priv, struct list_head *head, } if (lev > max_lev) { if (unlikely(lev >= ARRAY_SIZE(part)-1)) { - printk_once(KERN_DEBUG "list passed to" - " list_sort() too long for" - " efficiency\n"); + pr_debug_once("list passed to too long for efficient sorting\n"); lev--; } max_lev = lev; |