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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: linux-staging@xxxxxxxxxxxxxxx
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
 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(-)

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,
-- 
2.27.0





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux