linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Zhen Ni <zhen.ni@easystack.cn>,
	akpm@linux-foundation.org, surenb@google.com, mhocko@suse.com,
	jackmanb@google.com, hannes@cmpxchg.org, ziy@nvidia.com
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] mm/page_owner: fix %pGp format specifier argument type
Date: Tue, 14 Apr 2026 10:20:36 +0200	[thread overview]
Message-ID: <ae365455-5e1e-41ef-97b4-12983eefebbf@kernel.org> (raw)
In-Reply-To: <20260414075813.3425968-1-zhen.ni@easystack.cn>

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)



      reply	other threads:[~2026-04-14  8:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-14  7:58 Zhen Ni
2026-04-14  8:20 ` Vlastimil Babka (SUSE) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae365455-5e1e-41ef-97b4-12983eefebbf@kernel.org \
    --to=vbabka@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jackmanb@google.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=surenb@google.com \
    --cc=zhen.ni@easystack.cn \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox