367-brcmfmac-avoid-gcc-5.1-warning.patch 1.2 KB

123456789101112131415161718192021222324252627282930
  1. From: Arnd Bergmann <[email protected]>
  2. Date: Tue, 12 May 2015 23:54:25 +0200
  3. Subject: [PATCH] brcmfmac: avoid gcc-5.1 warning
  4. gcc-5.0 gained a new warning in the fwsignal portion of the brcmfmac
  5. driver:
  6. drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c: In function 'brcmf_fws_txs_process':
  7. drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c:1478:8: warning: 'skb' may be used uninitialized in this function [-Wmaybe-uninitialized]
  8. This is a false positive, and marking the brcmf_fws_hanger_poppkt function
  9. as 'static inline' makes the warning go away. I have checked the object
  10. file output and while a little code gets moved around, the size of
  11. the binary remains identical.
  12. Signed-off-by: Arnd Bergmann <[email protected]>
  13. Signed-off-by: Kalle Valo <[email protected]>
  14. ---
  15. --- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
  16. +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
  17. @@ -635,7 +635,7 @@ static int brcmf_fws_hanger_pushpkt(stru
  18. return 0;
  19. }
  20. -static int brcmf_fws_hanger_poppkt(struct brcmf_fws_hanger *h,
  21. +static inline int brcmf_fws_hanger_poppkt(struct brcmf_fws_hanger *h,
  22. u32 slot_id, struct sk_buff **pktout,
  23. bool remove_item)
  24. {