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: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20250225145359.1126786-1-arnd@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>