Re: [PATCH] [v2] iwlegacy: don't warn for unused variables with DEBUG_FS=n
From: Arnd Bergmann
Date: Sat Mar 01 2025 - 07:38:55 EST
On Sat, Mar 1, 2025, at 13:28, Stanislaw Gruszka wrote:
> On Tue, Feb 25, 2025 at 03:53:53PM +0100, Arnd Bergmann wrote:
>
> But then the code will be compiled for !CONFIG_MAC80211_DEBUGFS
> case, it does compile for me:
>
> - 22475 1160 0 23635
> 5c53 drivers/net/wireless/intel/iwlegacy/4965-rs.o
> + 23008 1168 0 24176
> 5e70 drivers/net/wireless/intel/iwlegacy/4965-rs.o
Very strange, this really shouldn't happen. Which symbols
exactly do you see the compiler fail to drop with my patch,
and which compiler version are you using?
> How about moving
> static const struct il_rate_mcs_info il_rate_mcs[RATE_COUNT]
> under CONFIG_MAC80211_DEBUGFS ? Maybe inside the function that use it ?
It's not supposed to make a difference, let's try to figure
out if there is a compiler bug or a mistake in my patch first
and then fix it in the right place.
Arnd