linux/drivers/net/wireless/ath/ath6kl
Arnd Bergmann 10f3366b4d wireless: fix bogus maybe-uninitialized warning
The hostap_80211_rx() function is supposed to set up the mac addresses
for four possible cases, based on two bits of input data. For
some reason, gcc decides that it's possible that none of the these
four cases apply and the addresses remain uninitialized:

drivers/net/wireless/intersil/hostap/hostap_80211_rx.c: In function ‘hostap_80211_rx’:
arch/x86/include/asm/string_32.h:77:14: warning: ‘src’ may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/net/wireless/intel/ipw2x00/libipw_rx.c: In function ‘libipw_rx’:
arch/x86/include/asm/string_32.h:77:14: error: ‘dst’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
arch/x86/include/asm/string_32.h:78:22: error: ‘*((void *)&dst+4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

This warning is clearly nonsense, but changing the last case into
'default' makes it obvious to the compiler too, which avoids the
warning and probably leads to better object code too.

The same code is duplicated several times in the kernel, so this
patch uses the same workaround for all copies. The exact configuration
was hit only very rarely in randconfig builds and I only saw it
in three drivers, but I assume that all of them are potentially
affected, and it's better to keep the code consistent.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-11-17 08:46:38 +02:00
..
bmi.c
bmi.h ath6kl: Fix ath6kl_bmi_read_hi32 macro 2014-07-14 15:49:23 +03:00
cfg80211.c ath6kl: Allow the radio to report 0 dbm txpower without timing out 2016-09-09 15:13:40 +03:00
cfg80211.h cfg80211: pass name_assign_type to rdev_add_virtual_intf() 2015-03-30 10:36:17 +02:00
common.h ath: change logging functions to return void 2014-09-29 14:29:23 +03:00
core.c ath6kl: add ability to set debug uart baud rate 2016-04-26 14:57:44 +03:00
core.h ath6kl: fix typo 2016-05-28 11:21:39 +03:00
debug.c ath6kl: break stats gathering code into separate method 2015-10-29 13:06:58 +02:00
debug.h ath6kl: break stats gathering code into separate method 2015-10-29 13:06:58 +02:00
hif-ops.h
hif.c ath6kl: enable firmware crash dumps on the AR6004 2016-09-09 15:12:59 +03:00
hif.h ath6kl: fix struct hif_scatter_req list handling 2014-03-13 07:20:00 +02:00
htc_mbox.c ath6kl: Don't print error message when recv is canceled 2015-12-08 16:50:21 +02:00
htc_pipe.c ath6kl: implement rx flush for htc pipe 2014-07-14 16:03:01 +03:00
htc-ops.h
htc.h ath6kl: spell "distribution" correctly in a comment. 2015-07-29 11:14:04 +03:00
init.c ath6kl: add ability to set debug uart baud rate 2016-04-26 14:57:44 +03:00
Kconfig ath6kl: update Kconfig descriptions 2014-03-13 07:47:26 +02:00
main.c wireless: Use eth_<foo>_addr instead of memset 2015-03-03 17:01:36 -05:00
Makefile ath6kl: add tracing support and tracing points for wmi packets 2013-03-18 13:42:20 +02:00
recovery.c
sdio.c ath6kl: configure SDIO when power is reapplied 2016-10-06 10:14:45 +03:00
target.h ath6kl: remove spaces before semicolon 2014-03-13 07:47:05 +02:00
testmode.c cfg80211: add wdev to testmode cmd 2013-08-12 14:11:37 +02:00
testmode.h cfg80211: add wdev to testmode cmd 2013-08-12 14:11:37 +02:00
trace.c ath6kl: add tracing points for sdio transfers 2013-03-18 13:42:20 +02:00
trace.h ath6kl: fix size_t printf warnings 2013-03-20 08:55:26 -04:00
txrx.c ath6kl: Fix WLAN tethering authentication problem. 2016-07-19 16:22:32 +03:00
usb.c ath6kl: remove incorrect reset_resume handler 2014-11-04 00:59:05 +02:00
wmi.c wireless: fix bogus maybe-uninitialized warning 2016-11-17 08:46:38 +02:00
wmi.h cfg80211: remove enum ieee80211_band 2016-04-12 15:56:15 +02:00