* [PATCH] lib/hexdump: print_hex_dump_bytes() calls print_hex_dump_debug()
@ 2026-03-31 15:21 Geert Uytterhoeven
2026-04-01 9:21 ` Petr Mladek
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2026-03-31 15:21 UTC (permalink / raw)
To: Petr Mladek, Steven Rostedt, John Ogness, Sergey Senozhatsky,
Andrew Morton, Stephen Boyd
Cc: linux-kernel, Geert Uytterhoeven
print_hex_dump_bytes() claims to be a simple wrapper around
print_hex_dump(), but it actally calls print_hex_dump_debug(), which
means no output is printed if (dynamic) DEBUG is disabled.
Update the documentation to match the implementation.
Fixes: 091cb0994edd20d6 ("lib/hexdump: make print_hex_dump_bytes() a nop on !DEBUG builds")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
I added a print_hex_dump_bytes() call, and wondered where my hexdump
went...
---
include/linux/printk.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 63d516c873b4c412..1a33b813808cabde 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -802,7 +802,8 @@ static inline void print_hex_dump_debug(const char *prefix_str, int prefix_type,
#endif
/**
- * print_hex_dump_bytes - shorthand form of print_hex_dump() with default params
+ * print_hex_dump_bytes - shorthand form of print_hex_dump_debug() with default
+ * params
* @prefix_str: string to prefix each line with;
* caller supplies trailing spaces for alignment if desired
* @prefix_type: controls whether prefix of an offset, address, or none
@@ -810,7 +811,7 @@ static inline void print_hex_dump_debug(const char *prefix_str, int prefix_type,
* @buf: data blob to dump
* @len: number of bytes in the @buf
*
- * Calls print_hex_dump(), with log level of KERN_DEBUG,
+ * Calls print_hex_dump_debug(), with log level of KERN_DEBUG,
* rowsize of 16, groupsize of 1, and ASCII output included.
*/
#define print_hex_dump_bytes(prefix_str, prefix_type, buf, len) \
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] lib/hexdump: print_hex_dump_bytes() calls print_hex_dump_debug()
2026-03-31 15:21 [PATCH] lib/hexdump: print_hex_dump_bytes() calls print_hex_dump_debug() Geert Uytterhoeven
@ 2026-04-01 9:21 ` Petr Mladek
0 siblings, 0 replies; 2+ messages in thread
From: Petr Mladek @ 2026-04-01 9:21 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Steven Rostedt, John Ogness, Sergey Senozhatsky, Andrew Morton,
Stephen Boyd, linux-kernel
On Tue 2026-03-31 17:21:43, Geert Uytterhoeven wrote:
> print_hex_dump_bytes() claims to be a simple wrapper around
> print_hex_dump(), but it actally calls print_hex_dump_debug(), which
> means no output is printed if (dynamic) DEBUG is disabled.
>
> Update the documentation to match the implementation.
>
> Fixes: 091cb0994edd20d6 ("lib/hexdump: make print_hex_dump_bytes() a nop on !DEBUG builds")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Great catch!
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards,
Petr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-01 9:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-31 15:21 [PATCH] lib/hexdump: print_hex_dump_bytes() calls print_hex_dump_debug() Geert Uytterhoeven
2026-04-01 9:21 ` Petr Mladek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®