Subject: Re: [PATCH] brcmsmac: initialize morepending in brcms_b_recv()

From: "Arend van Spriel" <arend-dY08KVG/lbpWk0Htik3J/[email-masked]>
Date: Sun, 23 Dec 2012 18:31:13 +0100

On 12/22/2012 10:07 PM, Geert Uytterhoeven wrote:
> drivers/net/wireless/brcm80211/brcmsmac/main.c: In function ‘brcms_b_recv’:
> drivers/net/wireless/brcm80211/brcmsmac/main.c:7636: warning: ‘morepending’ may be used uninitialized in this function
> 

Reading the code this warning seems to be invalid except when RXBND is
defined as zero, which would make the whole function totally bogus.
Would be good to have a WARN_ON(!RXBND) in brcms_b_attach().

I don't like pleasing a compiler with unnecessary initializers but I am
also for builds with zero warnings. So...

Acked-by: Arend van Spriel <arend-dY08KVG/lbpWk0Htik3J/[email-masked]>
> Signed-off-by: Geert Uytterhoeven <[email-masked]>
> ---
>  drivers/net/wireless/brcm80211/brcmsmac/main.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
> index 17594de..5f0f444 100644
> --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
> +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
> @@ -7633,7 +7633,7 @@ brcms_b_recv(struct brcms_hardware *wlc_hw, uint fifo, bool bound)
>  
>  	uint n = 0;
>  	uint bound_limit = bound ? RXBND : -1;
> -	bool morepending;
> +	bool morepending = false;
>  
>  	skb_queue_head_init(&recv_frames);
>  

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email-masked]
More majordomo info at  http://vger.kernel.org/majordomo-info.html