linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] brcmsmac: remove duplicated if condition
@ 2019-09-25 20:31 Denis Efremov
  2019-10-01  9:15 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Denis Efremov @ 2019-09-25 20:31 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Denis Efremov, Wright Feng, Chi-Hsien Lin, Hante Meuleman,
	Franky Lin, Arend van Spriel, David S. Miller, linux-wireless,
	brcm80211-dev-list.pdl, netdev, linux-kernel

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

Signed-off-by: Denis Efremov <efremov@linux.com>
---
 .../net/wireless/broadcom/brcm80211/brcmsmac/channel.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c
index db783e94f929..5a6d9c86552a 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c
@@ -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;
-- 
2.21.0


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

* Re: [PATCH] brcmsmac: remove duplicated if condition
  2019-09-25 20:31 [PATCH] brcmsmac: remove duplicated if condition Denis Efremov
@ 2019-10-01  9:15 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-10-01  9:15 UTC (permalink / raw)
  To: Denis Efremov
  Cc: Denis Efremov, Wright Feng, Chi-Hsien Lin, Hante Meuleman,
	Franky Lin, Arend van Spriel, David S. Miller, linux-wireless,
	brcm80211-dev-list.pdl, netdev, linux-kernel

Denis Efremov <efremov@linux.com> wrote:

> The nested 'li_mimo == &locale_bn' check is excessive and always
> true. Thus it can be safely removed.
> 
> Signed-off-by: Denis Efremov <efremov@linux.com>

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

fa38b4fddc7c brcmsmac: remove duplicated if condition

-- 
https://patchwork.kernel.org/patch/11161343/

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


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

end of thread, other threads:[~2019-10-01  9:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-25 20:31 [PATCH] brcmsmac: remove duplicated if condition Denis Efremov
2019-10-01  9:15 ` Kalle Valo

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