Linux Trace Kernel
 help / color / mirror / Atom feed
* [PATCH] bootconfig: remove redundant assignment in xbc_parse_array()
@ 2026-09-10 16:30 Sang-Heon Jeon
  2026-09-11 14:28 ` Masami Hiramatsu
  0 siblings, 1 reply; 2+ messages in thread
From: Sang-Heon Jeon @ 2026-09-10 16:30 UTC (permalink / raw)
  To: Andrew Morton, Masami Hiramatsu; +Cc: linux-trace-kernel

After the loop, node is the last array value that xbc_add_child()
added, and xbc_parse_array() sets node->child to 0.

xbc_init_node() already set node->child to 0 when the value was
added, and node->child is not modified after that, so the assignment
is redundant.

So remove the assignment.

No functional change.

Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
 lib/bootconfig.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/bootconfig.c b/lib/bootconfig.c
index aba11caf6903..12dd259d490e 100644
--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@ -833,7 +833,6 @@ static int __init xbc_parse_array(char **__v)
 			return -ENOMEM;
 		*__v = next;
 	} while (c == ',');
-	node->child = 0;
 
 	return c;
 }

base-commit: 13e8b7707efcea3a401d242958ba0a392f227847
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bootconfig: remove redundant assignment in xbc_parse_array()
  2026-09-10 16:30 [PATCH] bootconfig: remove redundant assignment in xbc_parse_array() Sang-Heon Jeon
@ 2026-09-11 14:28 ` Masami Hiramatsu
  0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2026-09-11 14:28 UTC (permalink / raw)
  To: Sang-Heon Jeon; +Cc: Andrew Morton, linux-trace-kernel

On Fri, 11 Sep 2026 01:30:48 +0900
Sang-Heon Jeon <ekffu200098@gmail.com> wrote:

> After the loop, node is the last array value that xbc_add_child()
> added, and xbc_parse_array() sets node->child to 0.
> 
> xbc_init_node() already set node->child to 0 when the value was
> added, and node->child is not modified after that, so the assignment
> is redundant.
> 
> So remove the assignment.
> 
> No functional change.
> 

Looks good to me. It seems commit ca24306d83a1 ("bootconfig: Change
array value to use child node") has replaced next to child by mistake.

Thank you!


> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> ---
>  lib/bootconfig.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/lib/bootconfig.c b/lib/bootconfig.c
> index aba11caf6903..12dd259d490e 100644
> --- a/lib/bootconfig.c
> +++ b/lib/bootconfig.c
> @@ -833,7 +833,6 @@ static int __init xbc_parse_array(char **__v)
>  			return -ENOMEM;
>  		*__v = next;
>  	} while (c == ',');
> -	node->child = 0;
>  
>  	return c;
>  }
> 
> base-commit: 13e8b7707efcea3a401d242958ba0a392f227847
> -- 
> 2.43.0
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-11 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 16:30 [PATCH] bootconfig: remove redundant assignment in xbc_parse_array() Sang-Heon Jeon
2026-09-11 14:28 ` Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox