Re: [PATCH v1 2/3] tools/mm/slabinfo: remove dead assignment in get_obj_and_str()
From: SeongJae Park
Date: Fri May 15 2026 - 20:02:52 EST
On Fri, 15 May 2026 14:53:24 +0800 wangxuewen <18810879172@xxxxxxx> 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@xxxxxxxxxx>
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