* [PATCH v2] tools/mm/slabinfo: Fix --partial long option mapping
@ 2025-12-08 10:52 Kaushlendra Kumar
2025-12-10 3:17 ` SeongJae Park
0 siblings, 1 reply; 2+ messages in thread
From: Kaushlendra Kumar @ 2025-12-08 10:52 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, Kaushlendra Kumar
The long option "--partial" was incorrectly mapped to lowercase 'p' in
the opts[] array, but the getopt string and switch case handle uppercase
'P'. This mismatch caused --partial to be rejected.
Fix the long_options mapping to use 'P' so --partial works correctly
alongside the existing -P short option.
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
---
v2: Keep existing -P behavior instead of changing to -p per review
feedback
tools/mm/slabinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c
index 7c51d283504d..39f7eae7eecd 100644
--- a/tools/mm/slabinfo.c
+++ b/tools/mm/slabinfo.c
@@ -1405,7 +1405,7 @@ struct option opts[] = {
{ "numa", no_argument, NULL, 'n' },
{ "lines", required_argument, NULL, 'N'},
{ "ops", no_argument, NULL, 'o' },
- { "partial", no_argument, NULL, 'p'},
+ { "partial", no_argument, NULL, 'P'},
{ "report", no_argument, NULL, 'r' },
{ "shrink", no_argument, NULL, 's' },
{ "Size", no_argument, NULL, 'S'},
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] tools/mm/slabinfo: Fix --partial long option mapping
2025-12-08 10:52 [PATCH v2] tools/mm/slabinfo: Fix --partial long option mapping Kaushlendra Kumar
@ 2025-12-10 3:17 ` SeongJae Park
0 siblings, 0 replies; 2+ messages in thread
From: SeongJae Park @ 2025-12-10 3:17 UTC (permalink / raw)
To: Kaushlendra Kumar; +Cc: SeongJae Park, akpm, linux-mm
On Mon, 8 Dec 2025 16:22:40 +0530 Kaushlendra Kumar <kaushlendra.kumar@intel.com> wrote:
> The long option "--partial" was incorrectly mapped to lowercase 'p' in
> the opts[] array, but the getopt string and switch case handle uppercase
> 'P'. This mismatch caused --partial to be rejected.
>
> Fix the long_options mapping to use 'P' so --partial works correctly
> alongside the existing -P short option.
Looks nice finding and fix to me! I also confirmed the issue exists, and this
patch fixes it.
>
> Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Tested-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-10 3:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-08 10:52 [PATCH v2] tools/mm/slabinfo: Fix --partial long option mapping Kaushlendra Kumar
2025-12-10 3:17 ` SeongJae Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).