linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2] staging: wilc1000: replace switch statement by simple if condition
@ 2018-03-20 11:43 hariprasath.elango
  2018-03-20 11:47 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: hariprasath.elango @ 2018-03-20 11:43 UTC (permalink / raw)
  To: aditya.shankar, gregkh, ganesh.krishna, dan.carpenter
  Cc: gehariprasath, HariPrasath Elango, linux-wireless, devel,
	linux-kernel

From: HariPrasath Elango <hariprasath.elango@gmail.com>

In this case,there is only a single switch case statement.So replacing
by a simple if condition

Signed-off-by: HariPrasath Elango <hariprasath.elango@gmail.com>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 9d8d5d0..730d64f 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -776,14 +776,8 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
 	}
 
 	if (sme->crypto.n_akm_suites) {
-		switch (sme->crypto.akm_suites[0]) {
-		case WLAN_AKM_SUITE_8021X:
+		if (sme->crypto.akm_suites[0] == WLAN_AKM_SUITE_8021X)
 			auth_type = IEEE8021;
-			break;
-
-		default:
-			break;
-		}
 	}
 
 	curr_channel = nw_info->ch;
-- 
2.10.0.GIT

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

* Re: [PATCHv2] staging: wilc1000: replace switch statement by simple if condition
  2018-03-20 11:43 [PATCHv2] staging: wilc1000: replace switch statement by simple if condition hariprasath.elango
@ 2018-03-20 11:47 ` Greg KH
  2018-03-20 12:08   ` <Hariprasath Elango>
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2018-03-20 11:47 UTC (permalink / raw)
  To: hariprasath.elango
  Cc: aditya.shankar, ganesh.krishna, dan.carpenter, gehariprasath,
	linux-wireless, devel, linux-kernel

On Tue, Mar 20, 2018 at 05:13:31PM +0530, hariprasath.elango@gmail.com wrote:
> From: HariPrasath Elango <hariprasath.elango@gmail.com>
> 
> In this case,there is only a single switch case statement.So replacing
> by a simple if condition
> 
> Signed-off-by: HariPrasath Elango <hariprasath.elango@gmail.com>
> ---
>  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)

What changed from v1?  Always put that information below the --- line,
like the kernel documentation asks you to do.

v3?  :)

thanks,

greg k-h

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

* Re: [PATCHv2] staging: wilc1000: replace switch statement by simple if condition
  2018-03-20 11:47 ` Greg KH
@ 2018-03-20 12:08   ` <Hariprasath Elango>
  0 siblings, 0 replies; 3+ messages in thread
From: <Hariprasath Elango> @ 2018-03-20 12:08 UTC (permalink / raw)
  To: Greg KH
  Cc: hariprasath.elango, aditya.shankar, ganesh.krishna, dan.carpenter,
	gehariprasath, linux-wireless, devel, linux-kernel

On Tue, Mar 20, 2018 at 12:47:21PM +0100, Greg KH wrote:
> On Tue, Mar 20, 2018 at 05:13:31PM +0530, hariprasath.elango@gmail.com wrote:
> > From: HariPrasath Elango <hariprasath.elango@gmail.com>
> > 
> > In this case,there is only a single switch case statement.So replacing
> > by a simple if condition
> > 
> > Signed-off-by: HariPrasath Elango <hariprasath.elango@gmail.com>
> > ---
> >  drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 +-------
> >  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> What changed from v1?  Always put that information below the --- line,
> like the kernel documentation asks you to do.
> 
> v3?  :)
> 
> thanks,
> 
> greg k-h

Lesson learned. I will send a v3 with version history included

regards,
hari prasath

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

end of thread, other threads:[~2018-03-20 12:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-20 11:43 [PATCHv2] staging: wilc1000: replace switch statement by simple if condition hariprasath.elango
2018-03-20 11:47 ` Greg KH
2018-03-20 12:08   ` <Hariprasath Elango>

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