Skip to contentSkip to conversation

brcmfmac: avoid gcc-5.1 warning

PATCH Applied Arnd Bergmann 2 participants 2 messages May 12, 2015 – May 26, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 brcmfmac: avoid gcc-5.1 warning

gcc-5.0 gained a new warning in the fwsignal portion of the brcmfmac driver:

drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c: In function 'brcmf_fws_txs_process':
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c:1478:8: warning: 'skb' may be used uninitialized in this function [-Wmaybe-uninitialized]

This is a false positive, and marking the brcmf_fws_hanger_poppkt function as 'static inline' makes the warning go away. I have checked the object file output and while a little code gets moved around, the size of the binary remains identical.

---
Found while building the ARM imx_v6_v7_defconfig configuration with gcc-5. We try to get all ARM defconfigs to build without warnings normally.

drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c +1 -1
index f0dda0ecd23b..5017eaa4af45 100644
@@ -635,7 +635,7 @@ static int brcmf_fws_hanger_pushpkt(struct brcmf_fws_hanger *h,
 	return 0;
 }
 
-static int brcmf_fws_hanger_poppkt(struct brcmf_fws_hanger *h,
+static inline int brcmf_fws_hanger_poppkt(struct brcmf_fws_hanger *h,
 					  u32 slot_id, struct sk_buff **pktout,
 					  bool remove_item)
 {
Applied
#1 lore raw
Quoted 7 lines

gcc-5.0 gained a new warning in the fwsignal portion of the brcmfmac driver:

drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c: In function 'brcmf_fws_txs_process':
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c:1478:8: warning: 'skb' may be used uninitialized in this function [-Wmaybe-uninitialized]

Quoted 6 lines

This is a false positive, and marking the brcmf_fws_hanger_poppkt function as 'static inline' makes the warning go away. I have checked the object file output and while a little code gets moved around, the size of the binary remains identical.

Thanks, applied to wireless-drivers-next.git.

Kalle Valo