68848e28e03b13e8da56a20ac96fc7891e136b91
[openwrt/staging/ansuel.git] /
1 From 92c7428f942da7dfcdc629b05b5114f80822d7a4 Mon Sep 17 00:00:00 2001
2 From: Ping-Ke Shih <pkshih@realtek.com>
3 Date: Tue, 16 Jan 2024 16:09:45 +0800
4 Subject: [PATCH 2/2] wifi: rtl8xxxu: make instances of iface limit and
5 combination to be static const
6
7 rtl8xxxu_limits and rtl8xxxu_combinations can be static const, so add
8 modifiers as desire. Otherwise, Sparse reports warnings
9
10 rtl8xxxu_core.c:7677:30: warning: symbol 'rtl8xxxu_limits' was not declared. Should it be static?
11 rtl8xxxu_core.c:7682:36: warning: symbol 'rtl8xxxu_combinations' was not declared. Should it be static?
12
13 Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
14 Signed-off-by: Kalle Valo <kvalo@kernel.org>
15 Link: https://msgid.link/20240116080945.20172-2-pkshih@realtek.com
16 ---
17 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
21 +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
22 @@ -7674,12 +7674,12 @@ static void rtl8xxxu_deinit_led(struct r
23 led_classdev_unregister(led);
24 }
25
26 -struct ieee80211_iface_limit rtl8xxxu_limits[] = {
27 +static const struct ieee80211_iface_limit rtl8xxxu_limits[] = {
28 { .max = 2, .types = BIT(NL80211_IFTYPE_STATION), },
29 { .max = 1, .types = BIT(NL80211_IFTYPE_AP), },
30 };
31
32 -struct ieee80211_iface_combination rtl8xxxu_combinations[] = {
33 +static const struct ieee80211_iface_combination rtl8xxxu_combinations[] = {
34 {
35 .limits = rtl8xxxu_limits,
36 .n_limits = ARRAY_SIZE(rtl8xxxu_limits),