[08/57] staging: rtw_ioctl_set: Move 'channel_table' to the only place it's used
diff mbox series

Message ID 20210414181129.1628598-9-lee.jones@linaro.org
State New, archived
Headers show
Series
  • Rid W=1 warnings from Staging
Related show

Commit Message

Lee Jones April 14, 2021, 6:10 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 In file included from drivers/staging/rtl8188eu/include/drv_types.h:41,
 from drivers/staging/rtl8188eu/core/rtw_ap.c:12:
 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: ‘channel_table’ defined but not used [-Wunused-const-variable=]
 In file included from drivers/staging/rtl8188eu/include/drv_types.h:41,
 from drivers/staging/rtl8188eu/core/rtw_cmd.c:10:
 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: ‘channel_table’ defined but not used [-Wunused-const-variable=]
 In file included from drivers/staging/rtl8188eu/include/drv_types.h:41,
 from drivers/staging/rtl8188eu/include/rtw_debug.h:11,
 from drivers/staging/rtl8188eu/core/rtw_debug.c:9:
 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: ‘channel_table’ defined but not used [-Wunused-const-variable=]
 In file included from drivers/staging/rtl8188eu/include/drv_types.h:41,
 from drivers/staging/rtl8188eu/core/rtw_efuse.c:10:
 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: ‘channel_table’ defined but not used [-Wunused-const-variable=]
 In file included from drivers/staging/rtl8188eu/include/drv_types.h:41,

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c   | 8 ++++++++
 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 8 --------
 2 files changed, 8 insertions(+), 8 deletions(-)

Patch
diff mbox series

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 1ef32ff900a98..c569001f6b839 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -13,6 +13,14 @@ 
 
 extern void indicate_wx_scan_complete_event(struct adapter *padapter);
 
+static const struct {
+	int channel_plan;
+	char *name;
+} channel_table[] = { { RT_CHANNEL_DOMAIN_FCC, "US" },
+	{ RT_CHANNEL_DOMAIN_ETSI, "EU" },
+	{ RT_CHANNEL_DOMAIN_MKK, "JP" },
+	{ RT_CHANNEL_DOMAIN_CHINA, "CN"} };
+
 u8 rtw_do_join(struct adapter *padapter)
 {
 	struct list_head *plist, *phead;
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
index 77eb5e3ef172b..03d55eb7dc16b 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h
@@ -171,14 +171,6 @@  struct rt_channel_plan_map {
 	unsigned char	Index2G;
 };
 
-static const struct {
-	int channel_plan;
-	char *name;
-} channel_table[] = { { RT_CHANNEL_DOMAIN_FCC, "US" },
-	{ RT_CHANNEL_DOMAIN_ETSI, "EU" },
-	{ RT_CHANNEL_DOMAIN_MKK, "JP" },
-	{ RT_CHANNEL_DOMAIN_CHINA, "CN"} };
-
 enum Associated_AP {
 	atherosAP	= 0,
 	broadcomAP	= 1,