diff mbox

[5/7] staging: wilc1000: replace switch statement by simple if condition

Message ID 2a46a5cc8ab69c1143c480bbac1f7e921011d982.1521030891.git.hariprasath.elango@gmail.com (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

hariprasath.elango@gmail.com March 14, 2018, 12:45 p.m. UTC
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(-)

Comments

Greg Kroah-Hartman March 19, 2018, 6:45 p.m. UTC | #1
On Wed, Mar 14, 2018 at 06:15:03PM +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(-)

Does not apply to my tree :(
Hariprasath Elango March 20, 2018, 6:12 a.m. UTC | #2
On Mon, Mar 19, 2018 at 07:45:46PM +0100, Greg KH wrote:
> On Wed, Mar 14, 2018 at 06:15:03PM +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(-)
> 
> Does not apply to my tree :(

Hi Greg,

Sorry about that. Shall I sent a v2 after rebasing my repo ? Will that
be fine ?
Dan Carpenter March 20, 2018, 11:29 a.m. UTC | #3
On Tue, Mar 20, 2018 at 11:42:27AM +0530, <Hariprasath Elango> wrote:
> On Mon, Mar 19, 2018 at 07:45:46PM +0100, Greg KH wrote:
> > On Wed, Mar 14, 2018 at 06:15:03PM +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(-)
> > 
> > Does not apply to my tree :(
> 
> Hi Greg,
> 
> Sorry about that.

Probably there were other patches on the list that were applied first.
It's likely not your fault, but just part of the process.

> Shall I sent a v2 after rebasing my repo ? Will that
> be fine ? 

Yes.

regards,
dan carpenter
Hariprasath Elango March 20, 2018, 11:42 a.m. UTC | #4
On Tue, Mar 20, 2018 at 02:29:51PM +0300, Dan Carpenter wrote:
> On Tue, Mar 20, 2018 at 11:42:27AM +0530, <Hariprasath Elango> wrote:
> > On Mon, Mar 19, 2018 at 07:45:46PM +0100, Greg KH wrote:
> > > On Wed, Mar 14, 2018 at 06:15:03PM +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(-)
> > > 
> > > Does not apply to my tree :(
> > 
> > Hi Greg,
> > 
> > Sorry about that.
> 
> Probably there were other patches on the list that were applied first.
> It's likely not your fault, but just part of the process.
> 
> > Shall I sent a v2 after rebasing my repo ? Will that
> > be fine ? 
> 
> Yes.
> 
> regards,
> dan carpenter

Hi dan,thanks for the feedback. I will send a new version of the patch
diff mbox

Patch

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index c901108..17bd762 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -772,14 +772,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 = pstrNetworkInfo->ch;