Commit cf6b9ba1 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Johannes Berg
Browse files

wifi: iwlegacy: don't warn for unused variables with DEBUG_FS=n



The reference to il_rate_mcs is inside of an #ifdef, causing a W=1 warning:

drivers/net/wireless/intel/iwlegacy/4965-rs.c:189:38: error: unused variable 'il_rate_mcs' [-Werror,-Wunused-const-variable]
static const struct il_rate_mcs_info il_rate_mcs[RATE_COUNT] = {

Replace the #ifdef with a PTR_IF() for better compile time analysis.
The dead code will still get eliminated, but the warning goes away.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20250225145359.1126786-1-arnd@kernel.org


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c61da149
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment