diff mbox series

wifi: iwlegacy: avoid size increase

Message ID 20250304144210.997531-1-arnd@kernel.org
State New
Headers show
Series wifi: iwlegacy: avoid size increase | expand

Commit Message

Arnd Bergmann March 4, 2025, 2:42 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

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>
---
Ideally this would be folded into my original fix. If that's not possible,
please apply on top.
---
 drivers/net/wireless/intel/iwlegacy/4965-rs.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlegacy/4965-rs.c b/drivers/net/wireless/intel/iwlegacy/4965-rs.c
index f754fb979546..0e5130d1fccd 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965-rs.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965-rs.c
@@ -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) {