004-02-v6.9-wifi-rtl8xxxu-make-instances-of-iface-limit-and-comb.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 92c7428f942da7dfcdc629b05b5114f80822d7a4 Mon Sep 17 00:00:00 2001
  2. From: Ping-Ke Shih <[email protected]>
  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. rtl8xxxu_limits and rtl8xxxu_combinations can be static const, so add
  7. modifiers as desire. Otherwise, Sparse reports warnings
  8. rtl8xxxu_core.c:7677:30: warning: symbol 'rtl8xxxu_limits' was not declared. Should it be static?
  9. rtl8xxxu_core.c:7682:36: warning: symbol 'rtl8xxxu_combinations' was not declared. Should it be static?
  10. Signed-off-by: Ping-Ke Shih <[email protected]>
  11. Signed-off-by: Kalle Valo <[email protected]>
  12. Link: https://msgid.link/[email protected]
  13. ---
  14. drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++--
  15. 1 file changed, 2 insertions(+), 2 deletions(-)
  16. --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
  17. +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
  18. @@ -7674,12 +7674,12 @@ static void rtl8xxxu_deinit_led(struct r
  19. led_classdev_unregister(led);
  20. }
  21. -struct ieee80211_iface_limit rtl8xxxu_limits[] = {
  22. +static const struct ieee80211_iface_limit rtl8xxxu_limits[] = {
  23. { .max = 2, .types = BIT(NL80211_IFTYPE_STATION), },
  24. { .max = 1, .types = BIT(NL80211_IFTYPE_AP), },
  25. };
  26. -struct ieee80211_iface_combination rtl8xxxu_combinations[] = {
  27. +static const struct ieee80211_iface_combination rtl8xxxu_combinations[] = {
  28. {
  29. .limits = rtl8xxxu_limits,
  30. .n_limits = ARRAY_SIZE(rtl8xxxu_limits),