All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: wilc1000: Remove 'else' after 'break'
@ 2016-09-24 11:58 Namrata A Shettar
  2016-09-24 12:22 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Namrata A Shettar @ 2016-09-24 11:58 UTC (permalink / raw)
  To: Aditya Shankar, Ganesh Krishna, Greg Kroah-Hartman,
	outreachy-kernel

Remove 'else' after 'break' to resolve checkpatch issue.
The statements after the 'if' condition body are executed only if
condition not true due to the 'break'.

Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
 Changes in v2:
 - Code indentation

 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 05e4501..042185d 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -695,11 +695,8 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
 			   sme->ssid_len) == 0) {
 			if (!sme->bssid)
 				break;
-			else
-			        if (memcmp(last_scanned_shadow[i].bssid,
-							sme->bssid,
-						       	ETH_ALEN) == 0)
-			                              break;
+			if (memcmp(last_scanned_shadow[i].bssid,sme->bssid,ETH_ALEN) == 0)
+			        break;
 		}
 	}
 
-- 
2.7.4



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

* Re: [PATCH v2] staging: wilc1000: Remove 'else' after 'break'
  2016-09-24 11:58 [PATCH v2] staging: wilc1000: Remove 'else' after 'break' Namrata A Shettar
@ 2016-09-24 12:22 ` Greg Kroah-Hartman
  2016-09-24 12:31   ` Namrata A Shettar
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2016-09-24 12:22 UTC (permalink / raw)
  To: Namrata A Shettar; +Cc: Aditya Shankar, Ganesh Krishna, outreachy-kernel

On Sat, Sep 24, 2016 at 05:28:16PM +0530, Namrata A Shettar wrote:
> Remove 'else' after 'break' to resolve checkpatch issue.
> The statements after the 'if' condition body are executed only if
> condition not true due to the 'break'.
> 
> Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
> ---
>  Changes in v2:
>  - Code indentation
> 
>  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> index 05e4501..042185d 100644
> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> @@ -695,11 +695,8 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
>  			   sme->ssid_len) == 0) {
>  			if (!sme->bssid)
>  				break;
> -			else
> -			        if (memcmp(last_scanned_shadow[i].bssid,
> -							sme->bssid,
> -						       	ETH_ALEN) == 0)
> -			                              break;
> +			if (memcmp(last_scanned_shadow[i].bssid,sme->bssid,ETH_ALEN) == 0)
> +			        break;
>  		}
>  	}
>  
> -- 
> 2.7.4

Always run your patches through checkpatch.pl so you don't get a grumpy
maintainer telling you to run your patches through checkpatch.pl...


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

* Re: [PATCH v2] staging: wilc1000: Remove 'else' after 'break'
  2016-09-24 12:22 ` Greg Kroah-Hartman
@ 2016-09-24 12:31   ` Namrata A Shettar
  0 siblings, 0 replies; 3+ messages in thread
From: Namrata A Shettar @ 2016-09-24 12:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman, outreachy-kernel

On Sat, Sep 24, 2016 at 02:22:46PM +0200, Greg Kroah-Hartman wrote:
> On Sat, Sep 24, 2016 at 05:28:16PM +0530, Namrata A Shettar wrote:
> > Remove 'else' after 'break' to resolve checkpatch issue.
> > The statements after the 'if' condition body are executed only if
> > condition not true due to the 'break'.
> > 
> > Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
> > ---
> >  Changes in v2:
> >  - Code indentation
> > 
> >  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 7 ++-----
> >  1 file changed, 2 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> > index 05e4501..042185d 100644
> > --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> > +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> > @@ -695,11 +695,8 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
> >  			   sme->ssid_len) == 0) {
> >  			if (!sme->bssid)
> >  				break;
> > -			else
> > -			        if (memcmp(last_scanned_shadow[i].bssid,
> > -							sme->bssid,
> > -						       	ETH_ALEN) == 0)
> > -			                              break;
> > +			if (memcmp(last_scanned_shadow[i].bssid,sme->bssid,ETH_ALEN) == 0)
> > +			        break;
> >  		}
> >  	}
> >  
> > -- 
> > 2.7.4
> 
> Always run your patches through checkpatch.pl so you don't get a grumpy
> maintainer telling you to run your patches through checkpatch.pl...

Haha yes! Will do that. Thanks for being patient and will keep that in
mind.

namrata


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

end of thread, other threads:[~2016-09-24 12:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-24 11:58 [PATCH v2] staging: wilc1000: Remove 'else' after 'break' Namrata A Shettar
2016-09-24 12:22 ` Greg Kroah-Hartman
2016-09-24 12:31   ` Namrata A Shettar

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.