kho: Remove redundant 0x prefixes
Subsystems (3)
PATCH 1/1 kho: Remove redundant 0x prefixes
The %pa format specifier already includes the 0x prefix. Remove the redundant prefixes to avoid printing 0x0x.
Fixes c609c144b0e8 ("kexec: add KHO parsing support")
Signed-off-by Thorsten Blum <[email protected]>
--- kernel/liveupdate/kexec_handover.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/liveupdate/kexec_handover.c +2 -2
@@ -2015,11 +2015,11 @@ void __init kho_populate(phys_addr_t fdt_phys, u64 fdt_len,memblock_add (area->addr, size); err =memblock_mark_kho_noprsrv (area->addr, size);if (err) { -pr_warn ("failed to mark the bootmem region 0x%pa+0x%pa: %pe" , +pr_warn ("failed to mark the bootmem region %pa+%pa: %pe" , &area->addr, &size,ERR_PTR (err)); goto unmap_bootmem; } -pr_debug ("Marked 0x%pa+0x%pa as bootmem" , &area->addr, &size); +pr_debug ("Marked %pa+%pa as bootmem" , &area->addr, &size); }memblock_reserve (bootmem_phys, bootmem_len);
Quoted 5 lines · Thorsten Blum
The %pa format specifier already includes the 0x prefix. Remove the redundant prefixes to avoid printing 0x0x.
Fixes c609c144b0e8 ("kexec: add KHO parsing support")Signed-off-by Thorsten Blum <[email protected]>
Hi Thorsten,
The change looks correct, but I see another problem in the same line:
kernel/liveupdate/kexec_handover.c void __init kho_populate(phys_addr_t fdt_phys, u64 fdt_len, · line 2019
Quoted 4 lines
kernel/liveupdate/kexec_handover.c +1
-1if (err) { -pr_warn ("failed to mark the bootmem region 0x%pa+0x%pa: %pe" , +pr_warn ("failed to mark the bootmem region %pa+%pa: %pe" , &area->addr, &size,ERR_PTR (err));
'size' is a 'u64', not a phys_addr_t, so the pr_warn will print the wrong on some platforms. Can you change this to use 0x%llx instead, or change the type of the temporary variable to phys_addr_t instead?
Arnd