wifi: rtl8xxxu: make instances of iface limit and combination to be static const
authorPing-Ke Shih <pkshih@realtek.com>
Tue, 16 Jan 2024 08:09:45 +0000 (16:09 +0800)
committerKalle Valo <kvalo@kernel.org>
Thu, 18 Jan 2024 09:36:57 +0000 (11:36 +0200)
rtl8xxxu_limits and rtl8xxxu_combinations can be static const, so add
modifiers as desire. Otherwise, Sparse reports warnings

rtl8xxxu_core.c:7677:30: warning: symbol 'rtl8xxxu_limits' was not declared. Should it be static?
rtl8xxxu_core.c:7682:36: warning: symbol 'rtl8xxxu_combinations' was not declared. Should it be static?

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240116080945.20172-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c

index 98700f3ad6f9b4d482cc7255ea8db1378367e94f..3b954c2fe448fa22633bf63de10c4c46ef9421ca 100644 (file)
@@ -7674,12 +7674,12 @@ static void rtl8xxxu_deinit_led(struct rtl8xxxu_priv *priv)
        led_classdev_unregister(led);
 }
 
-struct ieee80211_iface_limit rtl8xxxu_limits[] = {
+static const struct ieee80211_iface_limit rtl8xxxu_limits[] = {
        { .max = 2, .types = BIT(NL80211_IFTYPE_STATION), },
        { .max = 1, .types = BIT(NL80211_IFTYPE_AP), },
 };
 
-struct ieee80211_iface_combination rtl8xxxu_combinations[] = {
+static const struct ieee80211_iface_combination rtl8xxxu_combinations[] = {
        {
                .limits = rtl8xxxu_limits,
                .n_limits = ARRAY_SIZE(rtl8xxxu_limits),