* [PATCH v2] kho: Remove redundant 0x prefixes
@ 2026-11-04 16:23 Thorsten Blum
2026-11-04 16:28 ` Arnd Bergmann
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Thorsten Blum @ 2026-11-04 16:23 UTC (permalink / raw)
To: Mike Rapoport, Pasha Tatashin, Pratyush Yadav, Alexander Graf,
Arnd Bergmann, Andrew Morton, Changyuan Lyu
Cc: Thorsten Blum, kexec, linux-mm, linux-kernel
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@kernel.org>
---
Changes in v2:
- Use phys_addr_t for size as suggested by Arnd (thanks!)
- v1: https://lore.kernel.org/r/20261104160931.137174-3-blum@kernel.org/
kernel/liveupdate/kexec_handover.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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;
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);
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2] kho: Remove redundant 0x prefixes
2026-11-04 16:23 [PATCH v2] kho: Remove redundant 0x prefixes Thorsten Blum
@ 2026-11-04 16:28 ` Arnd Bergmann
2026-11-04 20:55 ` Pasha Tatashin
2026-11-04 22:06 ` Pasha Tatashin
2 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2026-11-04 16:28 UTC (permalink / raw)
To: Thorsten Blum, Mike Rapoport, Pasha Tatashin, Pratyush Yadav,
Alexander Graf, Andrew Morton, Changyuan Lyu
Cc: kexec, linux-mm, linux-kernel
On Wed, Nov 4, 2026, at 17:23, Thorsten Blum 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@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2] kho: Remove redundant 0x prefixes
2026-11-04 16:23 [PATCH v2] kho: Remove redundant 0x prefixes Thorsten Blum
2026-11-04 16:28 ` Arnd Bergmann
@ 2026-11-04 20:55 ` Pasha Tatashin
2026-11-04 20:59 ` Arnd Bergmann
2026-11-04 22:06 ` Pasha Tatashin
2 siblings, 1 reply; 6+ messages in thread
From: Pasha Tatashin @ 2026-11-04 20:55 UTC (permalink / raw)
To: Thorsten Blum
Cc: Mike Rapoport, Pasha Tatashin, Pratyush Yadav, Alexander Graf,
Arnd Bergmann, Andrew Morton, Changyuan Lyu, kexec, linux-mm,
linux-kernel
> 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@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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2] kho: Remove redundant 0x prefixes
2026-11-04 20:55 ` Pasha Tatashin
@ 2026-11-04 20:59 ` Arnd Bergmann
2026-11-04 21:52 ` Pasha Tatashin
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2026-11-04 20:59 UTC (permalink / raw)
To: Pasha Tatashin, Thorsten Blum
Cc: Mike Rapoport, Pratyush Yadav, Alexander Graf, Andrew Morton,
Changyuan Lyu, kexec, linux-mm, linux-kernel
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@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.
area->size is also a phys_addr_t, so using a local variable of the
same type makes sense for consistency.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2] kho: Remove redundant 0x prefixes
2026-11-04 20:59 ` Arnd Bergmann
@ 2026-11-04 21:52 ` Pasha Tatashin
0 siblings, 0 replies; 6+ messages in thread
From: Pasha Tatashin @ 2026-11-04 21:52 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Thorsten Blum, Mike Rapoport, Pratyush Yadav, Alexander Graf,
Andrew Morton, Changyuan Lyu, kexec, linux-mm, linux-kernel
On Wed, Nov 4, 2026 at 4:00 PM Arnd Bergmann <arnd@arndb.de> 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@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.
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] kho: Remove redundant 0x prefixes
2026-11-04 16:23 [PATCH v2] kho: Remove redundant 0x prefixes Thorsten Blum
2026-11-04 16:28 ` Arnd Bergmann
2026-11-04 20:55 ` Pasha Tatashin
@ 2026-11-04 22:06 ` Pasha Tatashin
2 siblings, 0 replies; 6+ messages in thread
From: Pasha Tatashin @ 2026-11-04 22:06 UTC (permalink / raw)
To: Mike Rapoport, Pratyush Yadav, Alexander Graf, Arnd Bergmann,
Andrew Morton, Changyuan Lyu, Thorsten Blum
Cc: kexec, linux-mm, linux-kernel
On Wed, 04 Nov 2026 17:23:53 +0100, Thorsten Blum wrote:
> kho: Remove redundant 0x prefixes
Applied, thanks!
https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git/log/?h=fixes
[1/1] kho: Remove redundant 0x prefixes
commit: 3cf66b39f560257e77f422d9fc73525ee2c29275
Best regards,
--
Pasha
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-04 22:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 16:23 [PATCH v2] kho: Remove redundant 0x prefixes Thorsten Blum
2026-11-04 16:28 ` Arnd Bergmann
2026-11-04 20:55 ` Pasha Tatashin
2026-11-04 20:59 ` Arnd Bergmann
2026-11-04 21:52 ` Pasha Tatashin
2026-11-04 22:06 ` Pasha Tatashin
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®