From: SeongJae Park <sj@kernel.org>
To: wangxuewen <18810879172@163.com>
Cc: SeongJae Park <sj@kernel.org>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, wangxuewen <wangxuewen@kylinos.cn>
Subject: Re: [PATCH v1 2/3] tools/mm/slabinfo: remove dead assignment in get_obj_and_str()
Date: Fri, 15 May 2026 17:02:41 -0700 [thread overview]
Message-ID: <20260516000242.136498-1-sj@kernel.org> (raw)
In-Reply-To: <20260515065325.4009527-3-18810879172@163.com>
On Fri, 15 May 2026 14:53:24 +0800 wangxuewen <18810879172@163.com> wrote:
> The assignment `x = NULL` sets the local parameter variable instead of
> `*x`, which is a no-op since `*x` was already set to NULL on the line
> above. Remove the dead assignment.
>
> Signed-off-by: wangxuewen <wangxuewen@kylinos.cn>
The email address mismatches.
> ---
> tools/mm/slabinfo.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c
> index 39f7eae7eecd..ac00daee41d1 100644
> --- a/tools/mm/slabinfo.c
> +++ b/tools/mm/slabinfo.c
> @@ -194,7 +194,6 @@ static unsigned long get_obj_and_str(const char *name, char **x)
> *x = NULL;
>
> if (!read_obj(name)) {
> - x = NULL;
> return 0;
> }
You could further remove the braces?
> result = strtoul(buffer, &p, 10);
> --
> 2.25.1
Thanks,
SJ
next prev parent reply other threads:[~2026-05-16 0:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 6:53 [PATCH v1 0/3] Cleanup and fix tools/mm/slabinfo utility wangxuewen
2026-05-15 6:53 ` [PATCH v1 1/3] tools/mm/slabinfo: Fix trace disable logic inversion wangxuewen
2026-05-15 23:58 ` SeongJae Park
2026-05-15 6:53 ` [PATCH v1 2/3] tools/mm/slabinfo: remove dead assignment in get_obj_and_str() wangxuewen
2026-05-16 0:02 ` SeongJae Park [this message]
2026-05-15 6:53 ` [PATCH v1 3/3] tools/mm/slabinfo: remove redundant slab->partial assignment wangxuewen
2026-05-16 0:04 ` SeongJae Park
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=20260516000242.136498-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=18810879172@163.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wangxuewen@kylinos.cn \
/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