wifi: iwlegacy: avoid size increase
authorArnd Bergmann <arnd@arndb.de>
Tue, 4 Mar 2025 14:42:07 +0000 (15:42 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 7 Mar 2025 08:24:00 +0000 (09:24 +0100)
My previous patch caused a slight code size increase when DEBUG_FS is disabled,
as Stanislaw Gruszka pointed out.

Fix this with an added IS_ENABLED() check.

Fixes: cf6b9ba172dd ("wifi: iwlegacy: don't warn for unused variables with DEBUG_FS=n")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Link: https://patch.msgid.link/20250304144210.997531-1-arnd@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlegacy/4965-rs.c

index f754fb979546e8a84743037f839e860325a40ff0..0e5130d1fccd38693c1552b2fb785ad83f637605 100644 (file)
@@ -2495,6 +2495,9 @@ il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx)
        u8 valid_tx_ant;
        u8 ant_sel_tx;
 
+       if (!IS_ENABLED(CONFIG_MAC80211_DEBUGFS))
+               return;
+
        il = lq_sta->drv;
        valid_tx_ant = il->hw_params.valid_tx_ant;
        if (lq_sta->dbg_fixed_rate) {