lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210414181129.1628598-9-lee.jones@linaro.org>
Date:   Wed, 14 Apr 2021 19:10:40 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     lee.jones@...aro.org
Cc:     linux-kernel@...r.kernel.org,
        Larry Finger <Larry.Finger@...inger.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-staging@...ts.linux.dev
Subject: [PATCH 08/57] staging: rtw_ioctl_set: Move 'channel_table' to the only place it's used

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@...inger.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-staging@...ts.linux.dev
Signed-off-by: Lee Jones <lee.jones@...aro.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(-)

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ