diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2025-06-10 11:22:23 +0200 |
|---|---|---|
| committer | Ping-Ke Shih <pkshih@realtek.com> | 2025-06-16 11:45:49 +0800 |
| commit | 2baacfe833460fee2f54b2c7270d632c98052cdc (patch) | |
| tree | eb2d35cd2e7de43386a21ddb59337c336020cc66 /net/lapb/lapb_in.c | |
| parent | 793905c70a56255b04e7cff82b01a300fff822be (diff) | |
wifi: rtlwifi: avoid stack size warning for _read_eeprom_info
txpower_info_{2g,5g} are too big to fit on the stack, but in most of the
rtlwifi variants this stays below the warning limit for stack frames.
In rtl8192ee and a few others, I see a case where clang decides to fully
inline this into rtl92ee_read_eeprom_info, triggering this warning:
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c:2178:6: error: stack frame size (1312) exceeds limit (1280) in 'rtl92ee_read_eeprom_info' [-Werror,-Wframe-larger-than]
Mark _rtl92ee_read_txpower_info_from_hwpg() as noinline_for_stack to
and mark _rtl92ee_get_chnl_group() as __always_inline to make clang
behave the same way as gcc. Inlining _rtl92ee_get_chnl_group helps
let the compiler see that the index is always in range. The same
change appears to be necessary in all rtlwifi variants.
A more thorough approach would be to avoid the use of the two structures
on the stack entirely and combine them with the struct rtl_efuse
data that is dynamically allocated and holds the same information.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250610092240.2639751-1-arnd@kernel.org
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions
