* [patch 3/3] brcmfmac: Using zero instead of NULL
@ 2012-10-03 6:07 Dan Carpenter
2012-10-04 16:27 ` Arend van Spriel
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-10-03 6:07 UTC (permalink / raw)
To: Brett Rudley
Cc: Roland Vossen, Arend van Spriel, Franky (Zhenhui) Lin, Kan Yan,
John W. Linville, Hante Meuleman, Pieter-Paul Giesberts,
linux-wireless, brcm80211-dev-list, kernel-janitors
Sparse complains that we use zero instead of NULL here. In fact, the
initialization is wrong and should be removed. Doing these kinds of
bogus initializations means that GCC can't detect unitialized variables
and leads to bugs.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index ed83b54..9ddafc2 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -3973,7 +3973,7 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg,
u8 *curr_ie_buf;
u8 *mgmt_ie_buf = NULL;
int mgmt_ie_buf_len;
- u32 *mgmt_ie_len = 0;
+ u32 *mgmt_ie_len;
u32 del_add_ie_buf_len = 0;
u32 total_ie_buf_len = 0;
u32 parsed_ie_buf_len = 0;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch 3/3] brcmfmac: Using zero instead of NULL
2012-10-03 6:07 [patch 3/3] brcmfmac: Using zero instead of NULL Dan Carpenter
@ 2012-10-04 16:27 ` Arend van Spriel
2012-10-04 18:43 ` Dan Carpenter
0 siblings, 1 reply; 3+ messages in thread
From: Arend van Spriel @ 2012-10-04 16:27 UTC (permalink / raw)
To: Dan Carpenter
Cc: Brett Rudley, Roland Vossen, Franky (Zhenhui) Lin, Kan Yan,
John W. Linville, Hante Meuleman, Pieter-Paul Giesberts,
linux-wireless, brcm80211-dev-list, kernel-janitors
On 10/03/2012 08:07 AM, Dan Carpenter wrote:
> Sparse complains that we use zero instead of NULL here. In fact, the
> initialization is wrong and should be removed. Doing these kinds of
> bogus initializations means that GCC can't detect unitialized variables
> and leads to bugs.
We already had it fixed internally, but your change is more sensible. I
had it reviewed internally and plan to send it to John for 3.8 (ie.
wireless-next after merge window). Let me know if that is ok with you.
Gr. AvS
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 3/3] brcmfmac: Using zero instead of NULL
2012-10-04 16:27 ` Arend van Spriel
@ 2012-10-04 18:43 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2012-10-04 18:43 UTC (permalink / raw)
To: Arend van Spriel
Cc: Brett Rudley, Roland Vossen, Franky (Zhenhui) Lin, Kan Yan,
John W. Linville, Hante Meuleman, Pieter-Paul Giesberts,
linux-wireless, brcm80211-dev-list, kernel-janitors
On Thu, Oct 04, 2012 at 06:27:48PM +0200, Arend van Spriel wrote:
> On 10/03/2012 08:07 AM, Dan Carpenter wrote:
> >Sparse complains that we use zero instead of NULL here. In fact, the
> >initialization is wrong and should be removed. Doing these kinds of
> >bogus initializations means that GCC can't detect unitialized variables
> >and leads to bugs.
>
> We already had it fixed internally, but your change is more
> sensible. I had it reviewed internally and plan to send it to John
> for 3.8 (ie. wireless-next after merge window). Let me know if that
> is ok with you.
Sounds good.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-04 18:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-03 6:07 [patch 3/3] brcmfmac: Using zero instead of NULL Dan Carpenter
2012-10-04 16:27 ` Arend van Spriel
2012-10-04 18:43 ` Dan Carpenter
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).