[PATCH v2] kho: Remove redundant 0x prefixes

Pasha Tatashin pasha.tatashin at soleen.com
Wed Nov 4 12:55:04 PST 2026


> The %pa format specifier already includes the 0x prefix. Remove the
> redundant prefixes to avoid printing 0x0x.
> 
> Use phys_addr_t for size to match the expected type.
> 
> Fixes: c609c144b0e8 ("kexec: add KHO parsing support")
> Signed-off-by: Thorsten Blum <blum at kernel.org>
>
> diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
> index 6f1f55fe3181..6a7600a0a7d5 100644
> --- a/kernel/liveupdate/kexec_handover.c
> +++ b/kernel/liveupdate/kexec_handover.c
> @@ -2010,16 +2010,16 @@ void __init kho_populate(phys_addr_t fdt_phys, u64 fdt_len,
>  	 */
>  	for (int i = 0; i < bootmem_cnt; i++) {
>  		struct kho_bootmem *area = &bootmem[i];
> -		u64 size = area->size;
> +		phys_addr_t size = area->size;

I am not sure; having a variable size of type phys_addr_t looks strange 
to me. Furthermore, KHO only works on 64-bit platforms because of how 
our radix tree is designed, and we do not plan to add support for 32-bit 
systems.

I would keep u64, or if using %pa for u64 is still an eyesore, use 
0x%llx for the size field.

-- 
Pasha




More information about the kexec mailing list