print_hex_dump: use %px when using DUMP_PREFIX_ADDRESS
PATCH 1/1 print_hex_dump: use %px when using DUMP_PREFIX_ADDRESS
This function is mainly used for debugging. But for that purpose the hashed memory address of the dumped data provides no useful information at all.
Note: There are only very few locations in the kernel, where print_hex_dump is not used with KERN_DEBUG and DUMP_PREFIX_ADDRESS.
Signed-off-by Roman Fietze <[email protected]>
--- lib/hexdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/hexdump.c +0 -0
@@ -256,7 +256,7 @@ void print_hex_dump(const char *level, const char
*prefix_str, int prefix_type,
switch (prefix_type) {
case DUMP_PREFIX_ADDRESS:
- printk("%s%s%p: %s\n",
+ printk("%s%s%px: %s\n",
level, prefix_str, ptr + i, linebuf);
break;
case DUMP_PREFIX_OFFSET:Signature · 11 lines
2.26.2 -- Roman Fietze Entwicklungsingenieur MAGNA Telemotive GmbH Breitwiesen 73347 Mühlhausen Tel.: +49 7335 18493-45
Quoted 9 lines · Roman Fietze
This function is mainly used for debugging. But for that purpose the hashed memory address of the dumped data provides no useful information at all.
Note: There are only very few locations in the kernel, where
print_hex_dumpis not used withKERN_DEBUGandDUMP_PREFIX_ADDRESS.Signed-off-by Roman Fietze <[email protected]>
Is this patch going to get picked up? I was hoping it would be in 5.9.