2016-11-18 15:15:35

by Rahul Krishnan

[permalink] [raw]
Subject: [PATCH]: staging: Greybus: Remove unnecessary braces for single statement block

This patch fixes the following checkpath.pl warning
WARNING: braces {} are not necessary for single statement blocks


Signed-off-by: Rahul Krishnan <[email protected]>
---
drivers/staging/greybus/sdio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c
index 5649ef1..66b37ea 100644
--- a/drivers/staging/greybus/sdio.c
+++ b/drivers/staging/greybus/sdio.c
@@ -191,9 +191,8 @@ static int _gb_sdio_process_events(struct gb_sdio_host *host, u8 event)
state_changed = 1;
}

- if (event & GB_SDIO_WP) {
+ if (event & GB_SDIO_WP)
host->read_only = true;
- }

if (state_changed) {
dev_info(mmc_dev(host->mmc), "card %s now event\n",
--
2.10.2


2016-11-18 15:30:45

by Rui Miguel Silva

[permalink] [raw]
Subject: Re: [PATCH]: staging: Greybus: Remove unnecessary braces for single statement block

Hi Rahul,
Thanks for the patch.
Now looks great.

On Fri, Nov 18, 2016 at 08:45:25PM +0530, Rahul Krishnan wrote:
>This patch fixes the following checkpath.pl warning
>WARNING: braces {} are not necessary for single statement blocks
>
>
>Signed-off-by: Rahul Krishnan <[email protected]>

Reviewed-by: Rui Miguel Silva <[email protected]>

>---
> drivers/staging/greybus/sdio.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c
>index 5649ef1..66b37ea 100644
>--- a/drivers/staging/greybus/sdio.c
>+++ b/drivers/staging/greybus/sdio.c
>@@ -191,9 +191,8 @@ static int _gb_sdio_process_events(struct gb_sdio_host *host, u8 event)
> state_changed = 1;
> }
>
>- if (event & GB_SDIO_WP) {
>+ if (event & GB_SDIO_WP)
> host->read_only = true;
>- }
>
> if (state_changed) {
> dev_info(mmc_dev(host->mmc), "card %s now event\n",
>--
>2.10.2
>

2016-11-21 04:08:39

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH]: staging: Greybus: Remove unnecessary braces for single statement block

On Fri, Nov 18, 2016 at 8:45 PM, Rahul Krishnan
<[email protected]> wrote:
> This patch fixes the following checkpath.pl warning
> WARNING: braces {} are not necessary for single statement blocks
>
>
> Signed-off-by: Rahul Krishnan <[email protected]>
> ---
> drivers/staging/greybus/sdio.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Acked-by: Viresh Kumar <[email protected]>