Re: [PATCH v2] kho: Remove redundant 0x prefixes

From: Pasha Tatashin

Date: Wed Nov 04 2026 - 18:23:29 EST


On Wed, Nov 4, 2026 at 4:00 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> On Wed, Nov 4, 2026, at 21:55, Pasha Tatashin wrote:
> >> 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@xxxxxxxxxx>
> >>
> >> 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.
>
> area->size is also a phys_addr_t, so using a local variable of the
> same type makes sense for consistency.

True, that makes sense.

Thanks,
Pasha

>
> Arnd