linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] init: main.c: Fixed a brace coding style issue.
@ 2020-06-28 13:41 B K Karthik
  2020-06-28 19:05 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: B K Karthik @ 2020-06-28 13:41 UTC (permalink / raw)
  To: Masami Hiramatsu, Steven Rostedt (VMware), Andrew Morton,
	Kees Cook, Dominik Brodowski, Arvind Sankar, glider@google.com,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 708 bytes --]

Fixed a coding style issue.

Signed-off-by: B K Karthik <karthik.bk2000@live.com>
---
 init/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/init/main.c b/init/main.c
index 9127b240fd26..d8477fb95bec 100644
--- a/init/main.c
+++ b/init/main.c
@@ -385,11 +385,11 @@ static u32 boot_config_checksum(unsigned char *p, u32 size)
 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;
-	} else if (strcmp(param, "--") == 0) {
+	else if (strcmp(param, "--") == 0)
 		initargs_found = true;
-	}
+
 	return 0;
 }

--
2.20.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH] init: main.c: Fixed a brace coding style issue.
  2020-06-28 13:41 [PATCH] init: main.c: Fixed a brace coding style issue B K Karthik
@ 2020-06-28 19:05 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2020-06-28 19:05 UTC (permalink / raw)
  To: B K Karthik
  Cc: Masami Hiramatsu, Andrew Morton, Kees Cook, Dominik Brodowski,
	Arvind Sankar, glider@google.com, linux-kernel

On Sun, 28 Jun 2020 09:41:00 -0400
B K Karthik <bkkarthik@pesu.pes.edu> wrote:

> Fixed a coding style issue.
> 
> Signed-off-by: B K Karthik <karthik.bk2000@live.com>
> ---
>  init/main.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/init/main.c b/init/main.c
> index 9127b240fd26..d8477fb95bec 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -385,11 +385,11 @@ static u32 boot_config_checksum(unsigned char *p, u32 size)
>  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;
> -	} else if (strcmp(param, "--") == 0) {
> +	else if (strcmp(param, "--") == 0)
>  		initargs_found = true;
> -	}
> +

NAK.

perhaps for simple if () ;else ; statements I'd be OK with this change,
but this is a if () ; else if () ; which is up to the preference of the
user. I find the brackets making it easier to see that this is not a
normal if () ; else ;

-- Steve


>  	return 0;
>  }
> 
> --
> 2.20.1
> 


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

end of thread, other threads:[~2020-06-28 19:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-28 13:41 [PATCH] init: main.c: Fixed a brace coding style issue B K Karthik
2020-06-28 19:05 ` Steven Rostedt

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).