From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Subject: Re: [PATCH] ath9k: fix RX_STAT_INC() etc macros Date: Sat, 13 Oct 2018 17:28:10 +0000 (UTC) Message-ID: <20181013172810.A856160B72@smtp.codeaurora.org> References: <20181009160351.680666-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: QCA ath9k Development , "David S. Miller" , Arnd Bergmann , Simon Wunderlich , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Arnd Bergmann Return-path: In-Reply-To: <20181009160351.680666-1-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Arnd Bergmann wrote: > 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: 03224678c013 ("ath9k: add counters for good and errorneous FFT/spectral frames") > Signed-off-by: Arnd Bergmann > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 72569b7be461 ath9k: fix RX_STAT_INC() etc macros -- https://patchwork.kernel.org/patch/10632911/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches