All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: greybus: Adding missing brackets into if..else block.
@ 2019-09-04 20:32 ` Julio Faracco
  0 siblings, 0 replies; 4+ messages in thread
From: Julio Faracco @ 2019-09-04 20:32 UTC (permalink / raw)
  To: greybus-dev, devel, linux-kernel, gregkh; +Cc: elder, johan, lkcamp

Inside a block of if..else conditional, else structure does not contain
brackets. This is not following regular policies of good coding style.
All parts of this conditional blocks should respect brackets inclusion.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
---
 drivers/staging/greybus/tools/loopback_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
index ba6f905f2..d46721502 100644
--- a/drivers/staging/greybus/tools/loopback_test.c
+++ b/drivers/staging/greybus/tools/loopback_test.c
@@ -801,8 +801,9 @@ static void prepare_devices(struct loopback_test *t)
 			write_sysfs_val(t->devices[i].sysfs_entry,
 					"outstanding_operations_max",
 					t->async_outstanding_operations);
-		} else
+		} else {
 			write_sysfs_val(t->devices[i].sysfs_entry, "async", 0);
+		}
 	}
 }
 
-- 
2.20.1


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

* [PATCH] staging: greybus: Adding missing brackets into if..else block.
@ 2019-09-04 20:32 ` Julio Faracco
  0 siblings, 0 replies; 4+ messages in thread
From: Julio Faracco @ 2019-09-04 20:32 UTC (permalink / raw)
  To: greybus-dev, devel, linux-kernel, gregkh; +Cc: lkcamp, elder, johan

Inside a block of if..else conditional, else structure does not contain
brackets. This is not following regular policies of good coding style.
All parts of this conditional blocks should respect brackets inclusion.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
---
 drivers/staging/greybus/tools/loopback_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
index ba6f905f2..d46721502 100644
--- a/drivers/staging/greybus/tools/loopback_test.c
+++ b/drivers/staging/greybus/tools/loopback_test.c
@@ -801,8 +801,9 @@ static void prepare_devices(struct loopback_test *t)
 			write_sysfs_val(t->devices[i].sysfs_entry,
 					"outstanding_operations_max",
 					t->async_outstanding_operations);
-		} else
+		} else {
 			write_sysfs_val(t->devices[i].sysfs_entry, "async", 0);
+		}
 	}
 }
 
-- 
2.20.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: greybus: Adding missing brackets into if..else block.
  2019-09-04 20:32 ` Julio Faracco
@ 2019-09-05  7:22   ` Johan Hovold
  -1 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2019-09-05  7:22 UTC (permalink / raw)
  To: Julio Faracco
  Cc: greybus-dev, devel, linux-kernel, gregkh, elder, johan, lkcamp

On Wed, Sep 04, 2019 at 08:32:09PM +0000, Julio Faracco wrote:
> Inside a block of if..else conditional, else structure does not contain
> brackets. This is not following regular policies of good coding style.

s/good/kernel/ ?

> All parts of this conditional blocks should respect brackets inclusion.

Did you check that there aren't further instances of this style
issue in this file? If so, please them all in one go.

Also please include greybus component you are changing in your subject
prefix:

	staging: greybus: loopback_test: ...

> Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
> ---
>  drivers/staging/greybus/tools/loopback_test.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
> index ba6f905f2..d46721502 100644
> --- a/drivers/staging/greybus/tools/loopback_test.c
> +++ b/drivers/staging/greybus/tools/loopback_test.c
> @@ -801,8 +801,9 @@ static void prepare_devices(struct loopback_test *t)
>  			write_sysfs_val(t->devices[i].sysfs_entry,
>  					"outstanding_operations_max",
>  					t->async_outstanding_operations);
> -		} else
> +		} else {
>  			write_sysfs_val(t->devices[i].sysfs_entry, "async", 0);
> +		}
>  	}
>  }

Johan

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

* Re: [PATCH] staging: greybus: Adding missing brackets into if..else block.
@ 2019-09-05  7:22   ` Johan Hovold
  0 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2019-09-05  7:22 UTC (permalink / raw)
  To: Julio Faracco
  Cc: devel, elder, gregkh, johan, linux-kernel, greybus-dev, lkcamp

On Wed, Sep 04, 2019 at 08:32:09PM +0000, Julio Faracco wrote:
> Inside a block of if..else conditional, else structure does not contain
> brackets. This is not following regular policies of good coding style.

s/good/kernel/ ?

> All parts of this conditional blocks should respect brackets inclusion.

Did you check that there aren't further instances of this style
issue in this file? If so, please them all in one go.

Also please include greybus component you are changing in your subject
prefix:

	staging: greybus: loopback_test: ...

> Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
> ---
>  drivers/staging/greybus/tools/loopback_test.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/greybus/tools/loopback_test.c b/drivers/staging/greybus/tools/loopback_test.c
> index ba6f905f2..d46721502 100644
> --- a/drivers/staging/greybus/tools/loopback_test.c
> +++ b/drivers/staging/greybus/tools/loopback_test.c
> @@ -801,8 +801,9 @@ static void prepare_devices(struct loopback_test *t)
>  			write_sysfs_val(t->devices[i].sysfs_entry,
>  					"outstanding_operations_max",
>  					t->async_outstanding_operations);
> -		} else
> +		} else {
>  			write_sysfs_val(t->devices[i].sysfs_entry, "async", 0);
> +		}
>  	}
>  }

Johan
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2019-09-05  7:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 20:32 [PATCH] staging: greybus: Adding missing brackets into if..else block Julio Faracco
2019-09-04 20:32 ` Julio Faracco
2019-09-05  7:22 ` Johan Hovold
2019-09-05  7:22   ` Johan Hovold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.