]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtlwifi: rtl8821ae: make the read-only array params static const
authorColin Ian King <colin.i.king@gmail.com>
Wed, 11 Jun 2025 13:55:21 +0000 (14:55 +0100)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 16 Jun 2025 03:51:38 +0000 (11:51 +0800)
Don't populate the read-only array params on the stack at run time,
instead make it static const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250611135521.172521-1-colin.i.king@gmail.com
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c

index 8c51f4d3682024ef1e89ac934430d9c026e66660..a5a34b5edcfdbf52f06621206dc06f2dd65b393e 100644 (file)
@@ -3064,10 +3064,12 @@ static void _rtl8821ae_read_adapter_info(struct ieee80211_hw *hw, bool b_pseudo_
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
        struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-       int params[] = {RTL_EEPROM_ID, EEPROM_VID, EEPROM_DID,
-                       EEPROM_SVID, EEPROM_SMID, EEPROM_MAC_ADDR,
-                       EEPROM_CHANNELPLAN, EEPROM_VERSION, EEPROM_CUSTOMER_ID,
-                       COUNTRY_CODE_WORLD_WIDE_13};
+       static const int params[] = {
+               RTL_EEPROM_ID, EEPROM_VID, EEPROM_DID,
+               EEPROM_SVID, EEPROM_SMID, EEPROM_MAC_ADDR,
+               EEPROM_CHANNELPLAN, EEPROM_VERSION, EEPROM_CUSTOMER_ID,
+               COUNTRY_CODE_WORLD_WIDE_13
+       };
        u8 *hwinfo;
 
        if (b_pseudo_test) {