Skip to contentSkip to conversation

brcmsmac: remove duplicated if condition

PATCH In review Denis Efremov 2 participants 2 messages Sep 25, 2019 – Oct 1, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 brcmsmac: remove duplicated if condition

The nested 'li_mimo == &locale_bn' check is excessive and always true. Thus it can be safely removed.

---
 .../net/wireless/broadcom/brcm80211/brcmsmac/channel.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c +4 -6
index db783e94f929..5a6d9c86552a 100644
@@ -496,13 +496,11 @@ brcms_c_channel_reg_limits(struct brcms_cm_info *wlc_cm, u16 chanspec,
 	 * table and override CDD later
 	 */
 	if (li_mimo == &locale_bn) {
-		if (li_mimo == &locale_bn) {
-			maxpwr20 = QDB(16);
-			maxpwr40 = 0;
+		maxpwr20 = QDB(16);
+		maxpwr40 = 0;
 
-			if (chan >= 3 && chan <= 11)
-				maxpwr40 = QDB(16);
-		}
+		if (chan >= 3 && chan <= 11)
+			maxpwr40 = QDB(16);
 
 		for (i = 0; i < BRCMS_NUM_RATES_MCS_1_STREAM; i++) {
 			txpwr->mcs_20_siso[i] = (u8) maxpwr20;
Signature · 1 line
2.21.0
#1 lore raw
Quoted 4 lines · Denis Efremov

The nested 'li_mimo == &locale_bn' check is excessive and always true. Thus it can be safely removed.

Patch applied to wireless-drivers-next.git, thanks.

fa38b4fddc7c brcmsmac: remove duplicated if condition

Signature · 3 lines
https://patchwork.kernel.org/patch/11161343/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches