]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: fix RX_STAT_INC() etc macros
authorArnd Bergmann <arnd@arndb.de>
Tue, 9 Oct 2018 16:03:06 +0000 (18:03 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 13 Oct 2018 17:27:35 +0000 (20:27 +0300)
commit9b6abe975ea19e05cdce31fed05b97b191ef2b92
tree09954acfdccdf3304a4d68a4944488b31506fdd4
parent0aa079294c8ab909949a2ae4f73afeb1d7f222bd
ath9k: fix RX_STAT_INC() etc macros

A couple of macros that deal with statistics in ath9k rely on the
declaration of the 'sc' variable, which they dereference.

However, when the statistics are disabled, the new instance in
ath_cmn_process_fft() causes a warning for an unused variable:

drivers/net/wireless/ath/ath9k/common-spectral.c: In function 'ath_cmn_process_fft':
drivers/net/wireless/ath/ath9k/common-spectral.c:474:20: error: unused variable 'sc' [-Werror=unused-variable]

It's better if those macros only operate on their arguments instead of
known variable names, and adding a cast to (void) kills off that warning.

Fixes: 7246bfd1a695 ("ath9k: add counters for good and errorneous FFT/spectral frames")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/antenna.c
drivers/net/wireless/ath/ath9k/common-spectral.c
drivers/net/wireless/ath/ath9k/debug.c
drivers/net/wireless/ath/ath9k/debug.h
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/recv.c
drivers/net/wireless/ath/ath9k/xmit.c