* [PATCH] wifi: mac80211: remove unused has_5g variable
@ 2023-03-25 13:03 Tom Rix
2023-03-25 15:58 ` Simon Horman
2023-03-31 14:50 ` wifi: brcmsmac: " Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Tom Rix @ 2023-03-25 13:03 UTC (permalink / raw)
To: aspriel, franky.lin, hante.meuleman, kvalo, davem, edumazet,
kuba, pabeni, nathan, ndesaulniers, johannes.berg, quic_srirrama,
alexander, shaul.triebitz
Cc: linux-wireless, brcm80211-dev-list.pdl, SHA-cyfmac-dev-list,
netdev, linux-kernel, llvm, Tom Rix
clang with W=1 reports
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c:1051:6: error:
variable 'has_5g' set but not used [-Werror,-Wunused-but-set-variable]
int has_5g = 0;
^
This variable is not used so remove it.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
index a8333e6adbda..0bd4e679a359 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c
@@ -1048,7 +1048,6 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw)
struct brcms_info *wl = hw->priv;
struct brcms_c_info *wlc = wl->wlc;
struct ieee80211_supported_band *band;
- int has_5g = 0;
u16 phy_type;
hw->wiphy->bands[NL80211_BAND_2GHZ] = NULL;
@@ -1070,7 +1069,6 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw)
/* Assume all bands use the same phy. True for 11n devices. */
if (wl->pub->_nbands > 1) {
- has_5g++;
if (phy_type == PHY_TYPE_N || phy_type == PHY_TYPE_LCN) {
band = &wlc->bandstate[BAND_5G_INDEX]->band;
*band = brcms_band_5GHz_nphy_template;
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: mac80211: remove unused has_5g variable
2023-03-25 13:03 [PATCH] wifi: mac80211: remove unused has_5g variable Tom Rix
@ 2023-03-25 15:58 ` Simon Horman
2023-03-31 14:50 ` wifi: brcmsmac: " Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-03-25 15:58 UTC (permalink / raw)
To: Tom Rix
Cc: aspriel, franky.lin, hante.meuleman, kvalo, davem, edumazet,
kuba, pabeni, nathan, ndesaulniers, johannes.berg, quic_srirrama,
alexander, shaul.triebitz, linux-wireless,
brcm80211-dev-list.pdl, SHA-cyfmac-dev-list, netdev,
linux-kernel, llvm
On Sat, Mar 25, 2023 at 09:03:43AM -0400, Tom Rix wrote:
> clang with W=1 reports
> drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c:1051:6: error:
> variable 'has_5g' set but not used [-Werror,-Wunused-but-set-variable]
> int has_5g = 0;
> ^
> This variable is not used so remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: wifi: brcmsmac: remove unused has_5g variable
2023-03-25 13:03 [PATCH] wifi: mac80211: remove unused has_5g variable Tom Rix
2023-03-25 15:58 ` Simon Horman
@ 2023-03-31 14:50 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2023-03-31 14:50 UTC (permalink / raw)
To: Tom Rix
Cc: aspriel, franky.lin, hante.meuleman, davem, edumazet, kuba,
pabeni, nathan, ndesaulniers, johannes.berg, quic_srirrama,
alexander, shaul.triebitz, linux-wireless,
brcm80211-dev-list.pdl, SHA-cyfmac-dev-list, netdev,
linux-kernel, llvm, Tom Rix
Tom Rix <trix@redhat.com> wrote:
> clang with W=1 reports
> drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c:1051:6: error:
> variable 'has_5g' set but not used [-Werror,-Wunused-but-set-variable]
> int has_5g = 0;
> ^
> This variable is not used so remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
Patch applied to wireless-next.git, thanks.
5aeb763a27c2 wifi: brcmsmac: remove unused has_5g variable
--
https://patchwork.kernel.org/project/linux-wireless/patch/20230325130343.1334209-1-trix@redhat.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-31 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-25 13:03 [PATCH] wifi: mac80211: remove unused has_5g variable Tom Rix
2023-03-25 15:58 ` Simon Horman
2023-03-31 14:50 ` wifi: brcmsmac: " Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.