* [PATCH 19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap [not found] <20161017220342.1627073-1-arnd@arndb.de> @ 2016-10-17 22:13 ` Arnd Bergmann 2016-10-26 6:49 ` Kalle Valo 2016-10-27 15:05 ` [19/28] " Kalle Valo 0 siblings, 2 replies; 5+ messages in thread From: Arnd Bergmann @ 2016-10-17 22:13 UTC (permalink / raw) To: Arend van Spriel Cc: Linus Torvalds, linux-kernel, Arnd Bergmann, Hante Meuleman, Kalle Valo, Franky Lin, Pieter-Paul Giesberts, Franky (Zhenhui) Lin, Rafał Miłecki, linux-wireless, brcm80211-dev-list.pdl, netdev A bugfix added a sanity check around the assignment and use of the 'is_11d' variable, which looks correct to me, but as the function is rather complex already, this confuses the compiler to the point where it can no longer figure out if the variable is always initialized correctly: brcm80211/brcmfmac/cfg80211.c: In function ‘brcmf_cfg80211_start_ap’: brcm80211/brcmfmac/cfg80211.c:4586:10: error: ‘is_11d’ may be used uninitialized in this function [-Werror=maybe-uninitialized] This adds an initialization for the newly introduced case in which the variable should not really be used, in order to make the warning go away. Fixes: b3589dfe0212 ("brcmfmac: ignore 11d configuration errors") Cc: Hante Meuleman <hante.meuleman@broadcom.com> Cc: Arend van Spriel <arend.vanspriel@broadcom.com> Cc: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index b777e1b..78d9966 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4516,7 +4516,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, /* store current 11d setting */ if (brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_REGULATORY, &ifp->vif->is_11d)) { - supports_11d = false; + is_11d = supports_11d = false; } else { country_ie = brcmf_parse_tlvs((u8 *)settings->beacon.tail, settings->beacon.tail_len, -- 2.9.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap 2016-10-17 22:13 ` [PATCH 19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap Arnd Bergmann @ 2016-10-26 6:49 ` Kalle Valo 2016-10-26 9:57 ` Arnd Bergmann 2016-10-27 15:05 ` [19/28] " Kalle Valo 1 sibling, 1 reply; 5+ messages in thread From: Kalle Valo @ 2016-10-26 6:49 UTC (permalink / raw) To: Arnd Bergmann Cc: Arend van Spriel, Linus Torvalds, linux-kernel, Hante Meuleman, Franky Lin, Pieter-Paul Giesberts, Franky (Zhenhui) Lin, Rafał Miłecki, linux-wireless, brcm80211-dev-list.pdl, netdev Arnd Bergmann <arnd@arndb.de> writes: > A bugfix added a sanity check around the assignment and use of the > 'is_11d' variable, which looks correct to me, but as the function is > rather complex already, this confuses the compiler to the point where > it can no longer figure out if the variable is always initialized > correctly: > > brcm80211/brcmfmac/cfg80211.c: In function =E2=80=98brcmf_cfg80211_start_= ap=E2=80=99: > brcm80211/brcmfmac/cfg80211.c:4586:10: error: =E2=80=98is_11d=E2=80=99 ma= y be used uninitialized in this function [-Werror=3Dmaybe-uninitialized] > > This adds an initialization for the newly introduced case in which > the variable should not really be used, in order to make the warning > go away. > > Fixes: b3589dfe0212 ("brcmfmac: ignore 11d configuration errors") > Cc: Hante Meuleman <hante.meuleman@broadcom.com> > Cc: Arend van Spriel <arend.vanspriel@broadcom.com> > Cc: Kalle Valo <kvalo@codeaurora.org> > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Via which tree are you planning to submit this? Should I take it? --=20 Kalle Valo ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap 2016-10-26 6:49 ` Kalle Valo @ 2016-10-26 9:57 ` Arnd Bergmann 2016-10-26 11:11 ` Kalle Valo 0 siblings, 1 reply; 5+ messages in thread From: Arnd Bergmann @ 2016-10-26 9:57 UTC (permalink / raw) To: Kalle Valo Cc: Arend van Spriel, Linus Torvalds, linux-kernel, Hante Meuleman, Franky Lin, Pieter-Paul Giesberts, Franky (Zhenhui) Lin, Rafał Miłecki, linux-wireless, brcm80211-dev-list.pdl, netdev On Wednesday, October 26, 2016 9:49:58 AM CEST Kalle Valo wrote: > Arnd Bergmann <arnd@arndb.de> writes: > > > A bugfix added a sanity check around the assignment and use of the > > 'is_11d' variable, which looks correct to me, but as the function is > > rather complex already, this confuses the compiler to the point where > > it can no longer figure out if the variable is always initialized > > correctly: > > > > brcm80211/brcmfmac/cfg80211.c: In function ‘brcmf_cfg80211_start_ap’: > > brcm80211/brcmfmac/cfg80211.c:4586:10: error: ‘is_11d’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > > > > This adds an initialization for the newly introduced case in which > > the variable should not really be used, in order to make the warning > > go away. > > > > Fixes: b3589dfe0212 ("brcmfmac: ignore 11d configuration errors") > > Cc: Hante Meuleman <hante.meuleman@broadcom.com> > > Cc: Arend van Spriel <arend.vanspriel@broadcom.com> > > Cc: Kalle Valo <kvalo@codeaurora.org> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > Via which tree are you planning to submit this? Should I take it? I'd prefer if you can take it and forward it along with your other bugfixes. I'll try to take care of the ones that nobody else picked up. Arnd ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap 2016-10-26 9:57 ` Arnd Bergmann @ 2016-10-26 11:11 ` Kalle Valo 0 siblings, 0 replies; 5+ messages in thread From: Kalle Valo @ 2016-10-26 11:11 UTC (permalink / raw) To: Arnd Bergmann Cc: Arend van Spriel, Linus Torvalds, linux-kernel, Hante Meuleman, Franky Lin, Pieter-Paul Giesberts, Franky (Zhenhui) Lin, Rafał Miłecki, linux-wireless, brcm80211-dev-list.pdl, netdev Arnd Bergmann <arnd@arndb.de> writes: > On Wednesday, October 26, 2016 9:49:58 AM CEST Kalle Valo wrote: >> Arnd Bergmann <arnd@arndb.de> writes: >>=20 >> > A bugfix added a sanity check around the assignment and use of the >> > 'is_11d' variable, which looks correct to me, but as the function is >> > rather complex already, this confuses the compiler to the point where >> > it can no longer figure out if the variable is always initialized >> > correctly: >> > >> > brcm80211/brcmfmac/cfg80211.c: In function =E2=80=98brcmf_cfg80211_sta= rt_ap=E2=80=99: >> > brcm80211/brcmfmac/cfg80211.c:4586:10: error: =E2=80=98is_11d=E2=80=99= may be used uninitialized in this function [-Werror=3Dmaybe-uninitialized] >> > >> > This adds an initialization for the newly introduced case in which >> > the variable should not really be used, in order to make the warning >> > go away. >> > >> > Fixes: b3589dfe0212 ("brcmfmac: ignore 11d configuration errors") >> > Cc: Hante Meuleman <hante.meuleman@broadcom.com> >> > Cc: Arend van Spriel <arend.vanspriel@broadcom.com> >> > Cc: Kalle Valo <kvalo@codeaurora.org> >> > Signed-off-by: Arnd Bergmann <arnd@arndb.de> >>=20 >> Via which tree are you planning to submit this? Should I take it? > > I'd prefer if you can take it and forward it along with your other > bugfixes. I'll try to take care of the ones that nobody else > picked up. Ok, I'll take it. I'm planning to push this to 4.9. --=20 Kalle Valo ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap 2016-10-17 22:13 ` [PATCH 19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap Arnd Bergmann 2016-10-26 6:49 ` Kalle Valo @ 2016-10-27 15:05 ` Kalle Valo 1 sibling, 0 replies; 5+ messages in thread From: Kalle Valo @ 2016-10-27 15:05 UTC (permalink / raw) To: Arnd Bergmann Cc: Arend van Spriel, Linus Torvalds, linux-kernel, Arnd Bergmann, Hante Meuleman, Franky Lin, Pieter-Paul Giesberts, Franky (Zhenhui) Lin, Rafał Miłecki, linux-wireless, brcm80211-dev-list.pdl, netdev Arnd Bergmann <arnd@arndb.de> wrote: > A bugfix added a sanity check around the assignment and use of the > 'is_11d' variable, which looks correct to me, but as the function is > rather complex already, this confuses the compiler to the point where > it can no longer figure out if the variable is always initialized > correctly: > > brcm80211/brcmfmac/cfg80211.c: In function ‘brcmf_cfg80211_start_ap’: > brcm80211/brcmfmac/cfg80211.c:4586:10: error: ‘is_11d’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > > This adds an initialization for the newly introduced case in which > the variable should not really be used, in order to make the warning > go away. > > Fixes: b3589dfe0212 ("brcmfmac: ignore 11d configuration errors") > Cc: Hante Meuleman <hante.meuleman@broadcom.com> > Cc: Arend van Spriel <arend.vanspriel@broadcom.com> > Cc: Kalle Valo <kvalo@codeaurora.org> > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Patch applied to wireless-drivers.git, thanks. d3532ea6ce4e brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap -- https://patchwork.kernel.org/patch/9380763/ Documentation about submitting wireless patches and checking status from patchwork: https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-27 15:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20161017220342.1627073-1-arnd@arndb.de>
2016-10-17 22:13 ` [PATCH 19/28] brcmfmac: avoid maybe-uninitialized warning in brcmf_cfg80211_start_ap Arnd Bergmann
2016-10-26 6:49 ` Kalle Valo
2016-10-26 9:57 ` Arnd Bergmann
2016-10-26 11:11 ` Kalle Valo
2016-10-27 15:05 ` [19/28] " 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).