Skip to contentSkip to conversation

init: Unnecessary braces around single line statment.

PATCH In review [email protected] 4 participants 7 messages Jan 25, 2025 – Jan 28, 2025 3 messages not in the archive Kernel janitors

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 init: Unnecessary braces around single line statment.

From: Jeremy Clifton <[email protected]>

Warning found with checkpatch.pl script. Removed unnecessary braces.

---
 init/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
init/main.c +1 -2
index 00fac1170294..64034fce4c9e 100644
@@ -398,9 +398,8 @@ static char * __init xbc_make_cmdline(const char *key)
 static int __init bootconfig_params(char *param, char *val,
 				    const char *unused, void *arg)
 {
-	if (strcmp(param, "bootconfig") == 0) {
+	if (strcmp(param, "bootconfig") == 0)
 		bootconfig_found = true;
-	}
 	return 0;
 }
 
Signature · 1 line
2.43.0

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 3 lines
Quoted 2 lines

2. Please avoid a typo in the summary phrase.

I will need to resubmit another patch to the mailing list.

Yes, please.

Quoted 1 line

How do I close this one?

It will probably be noticed that you sent a subsequent patch version.

Quoted 1 line

Should I reference this in the new post with 'Fixes?'

Unlikely.

See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.13#n310

Regards,
Markus

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Re: init: Unnecessary braces around single line statement

Quoted 1 line

So ask yourself whether such a change is really worth it.

Some change combinations can occasionally become more worthwhile, can't they?

Regards,
Markus

#7 lore raw

Re: init: Unnecessary braces around single line statement

Le 28/01/2025 à 09:45, Markus Elfring a écrit :

Quoted 3 lines
Quoted 1 line

So ask yourself whether such a change is really worth it.

Some change combinations can occasionally become more worthwhile, can't they?

Sure that change would be perfect as part of a series which modifies bootconfig_params(), but as a standalone change I can't see the benefit.

#8 lore raw

Re: init: Unnecessary braces around single line statement

Quoted 9 lines · Christophe Leroy

Le 28/01/2025 à 09:45, Markus Elfring a écrit :

Quoted 3 lines
Quoted 1 line

So ask yourself whether such a change is really worth it.

Some change combinations can occasionally become more worthwhile, can't they?

Sure that change would be perfect as part of a series which modifies bootconfig_params(), but as a standalone change I can't see the benefit.

I agree here:

1. Cosmetic changes just complicate merging branches with really useful changes. They are complicate backporting fixes to stable kernels.

2. Cosmetic changes are material for bikeshedding. Some people might prefer the original code because it is better readable for them...

3. The authors of cosmetic changes will not learn much by this. Also it will also not help much to gain any reputation.

Best Regards,
Petr

#9 lore raw

Re: init: Unnecessary braces around single line statement

…

Quoted 1 line

3. The authors of cosmetic changes will not learn much by this.…

Would any contributors wonder how many efforts may be invested in coding style improvements for selected software components?

Regards,
Markus