Skip to contentSkip to conversation

staging: wilc1000: replace switch statement by simple if condition

PATCH Superseded [email protected] 2 participants 3 messages Mar 20, 2018 Staging

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: wilc1000: replace switch statement by simple if condition

From: HariPrasath Elango <[email protected]>

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

---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1 -7
index 9d8d5d0..730d64f 100644
@@ -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;
Signature · 1 line
2.10.0.GIT
maintainer
#1 lore raw
Quoted 9 lines · On Tue, Mar 20, 2018 at 05:13:31PM +0530, [email protected] wrote:

From: HariPrasath Elango <[email protected]>

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

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

#2 lore raw
Quoted 11 lines · Greg KH
Quoted 9 lines · On Tue, Mar 20, 2018 at 05:13:31PM +0530, [email protected] wrote:

From: HariPrasath Elango <[email protected]>

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

---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
Quoted 8 lines

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