All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Namrata A Shettar <namrataashettar@gmail.com>
Cc: Aditya Shankar <aditya.shankar@microchip.com>,
	Ganesh Krishna <ganesh.krishna@microchip.com>,
	outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: Re: [PATCH v2] staging: wilc1000: Remove 'else' after 'break'
Date: Sat, 24 Sep 2016 14:22:46 +0200	[thread overview]
Message-ID: <20160924122246.GA6511@kroah.com> (raw)
In-Reply-To: <20160924115810.GA9412@namrata-HP-Pavilion-g6-Notebook-PC>

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


  reply	other threads:[~2016-09-24 12:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-24 11:58 [PATCH v2] staging: wilc1000: Remove 'else' after 'break' Namrata A Shettar
2016-09-24 12:22 ` Greg Kroah-Hartman [this message]
2016-09-24 12:31   ` Namrata A Shettar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160924122246.GA6511@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=aditya.shankar@microchip.com \
    --cc=ganesh.krishna@microchip.com \
    --cc=namrataashettar@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.