* [PATCH] mm/page_owner: fix %pGp format specifier argument type
@ 2026-04-14 7:58 Zhen Ni
2026-04-14 8:20 ` Vlastimil Babka (SUSE)
0 siblings, 1 reply; 2+ messages in thread
From: Zhen Ni @ 2026-04-14 7:58 UTC (permalink / raw)
To: akpm, vbabka, surenb, mhocko, jackmanb, hannes, ziy; +Cc: linux-mm, Zhen Ni
The %pGp format specifier expects an argument of type 'unsigned long *',
but page->flags is now of type 'memdesc_flags_t' (a struct containing
an unsigned long member 'f') after the introduction of memdesc_flags_t.
Fix the type mismatch by passing &page->flags.f instead of &page->flags,
which matches the expected type.
Fixes: 53fbef56e07d ("mm: introduce memdesc_flags_t")
Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
---
mm/page_owner.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_owner.c b/mm/page_owner.c
index 8178e0be557f..2dddcb6510aa 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -573,7 +573,7 @@ print_page_owner(char __user *buf, size_t count, unsigned long pfn,
migratetype_names[page_mt],
pfn >> pageblock_order,
migratetype_names[pageblock_mt],
- &page->flags);
+ &page->flags.f);
ret += stack_depot_snprint(handle, kbuf + ret, count - ret, 0);
if (ret >= count)
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] mm/page_owner: fix %pGp format specifier argument type
2026-04-14 7:58 [PATCH] mm/page_owner: fix %pGp format specifier argument type Zhen Ni
@ 2026-04-14 8:20 ` Vlastimil Babka (SUSE)
0 siblings, 0 replies; 2+ messages in thread
From: Vlastimil Babka (SUSE) @ 2026-04-14 8:20 UTC (permalink / raw)
To: Zhen Ni, akpm, surenb, mhocko, jackmanb, hannes, ziy; +Cc: linux-mm
On 4/14/26 09:58, Zhen Ni wrote:
> The %pGp format specifier expects an argument of type 'unsigned long *',
> but page->flags is now of type 'memdesc_flags_t' (a struct containing
> an unsigned long member 'f') after the introduction of memdesc_flags_t.
>
> Fix the type mismatch by passing &page->flags.f instead of &page->flags,
> which matches the expected type.
I think this has no visible effects as memdesc_flags_t just wraps unsigned
long, so it's not an urgent fix. Things could break if we modified
memdesc_flags_t further, or compiler/some tool got smart enough to flag the
mismath.
> Fixes: 53fbef56e07d ("mm: introduce memdesc_flags_t")
> Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
Acked-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
> ---
> mm/page_owner.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_owner.c b/mm/page_owner.c
> index 8178e0be557f..2dddcb6510aa 100644
> --- a/mm/page_owner.c
> +++ b/mm/page_owner.c
> @@ -573,7 +573,7 @@ print_page_owner(char __user *buf, size_t count, unsigned long pfn,
> migratetype_names[page_mt],
> pfn >> pageblock_order,
> migratetype_names[pageblock_mt],
> - &page->flags);
> + &page->flags.f);
>
> ret += stack_depot_snprint(handle, kbuf + ret, count - ret, 0);
> if (ret >= count)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-14 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-14 7:58 [PATCH] mm/page_owner: fix %pGp format specifier argument type Zhen Ni
2026-04-14 8:20 ` Vlastimil Babka (SUSE)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox