The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Ye Liu <ye.liu@linux.dev>, Andrew Morton <akpm@linux-foundation.org>
Cc: Ye Liu <liuye@kylinos.cn>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] tools/mm/page-types: Fix kpageflags option argument in getopt_long
Date: Wed, 13 May 2026 12:27:15 +0200	[thread overview]
Message-ID: <691bf8b6-32e6-4c3d-af98-a7730631e810@kernel.org> (raw)
In-Reply-To: <20260513022120.58033-4-ye.liu@linux.dev>

On 5/13/26 04:21, Ye Liu wrote:
> From: Ye Liu <liuye@kylinos.cn>
> 
> The --kpageflags option requires an argument to specify the kpageflags
> file path, but has_arg was set to 0 (no_argument) in the long options
> table. Change it to 1 (required_argument) so getopt_long correctly
> parses the argument.
> 
> Signed-off-by: Ye Liu <liuye@kylinos.cn>
> ---
>  tools/mm/page-types.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/mm/page-types.c b/tools/mm/page-types.c
> index 66f429f2b698..7fc5a8be5997 100644
> --- a/tools/mm/page-types.c
> +++ b/tools/mm/page-types.c
> @@ -1261,7 +1261,7 @@ static const struct option opts[] = {
>  	{ "no-summary", 0, NULL, 'N' },
>  	{ "hwpoison"  , 0, NULL, 'X' },
>  	{ "unpoison"  , 0, NULL, 'x' },
> -	{ "kpageflags", 0, NULL, 'F' },
> +	{ "kpageflags", 1, NULL, 'F' },
>  	{ "help"      , 0, NULL, 'h' },
>  	{ NULL        , 0, NULL, 0 }
>  };


Acked-by: David Hildenbrand (Arm) <david@kernel.org>

-- 
Cheers,

David

      reply	other threads:[~2026-05-13 10:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13  2:21 [PATCH 0/3] tools/mm/page-types: Fix misc bugs Ye Liu
2026-05-13  2:21 ` [PATCH 1/3] tools/mm/page-types: Fix typo in madvise() error message Ye Liu
2026-05-13 10:18   ` David Hildenbrand (Arm)
2026-05-13  2:21 ` [PATCH 2/3] tools/mm/page-types: Fix ternary operator precedence in sigbus handler Ye Liu
2026-05-13 10:24   ` David Hildenbrand (Arm)
2026-05-13  2:21 ` [PATCH 3/3] tools/mm/page-types: Fix kpageflags option argument in getopt_long Ye Liu
2026-05-13 10:27   ` David Hildenbrand (Arm) [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=691bf8b6-32e6-4c3d-af98-a7730631e810@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liuye@kylinos.cn \
    --cc=ye.liu@linux.dev \
    /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