All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
	Amitkumar Karwar <amitkarwar@gmail.com>,
	Ganapathi Bhat <ganapathi.bhat@nxp.com>,
	Xinming Hu <huxinming820@gmail.com>
Subject: [PATCH 16/28] wireless: marvell: mwifiex: init: Move 'tos_to_tid_inv' to where it's used
Date: Wed, 19 Aug 2020 08:23:50 +0100	[thread overview]
Message-ID: <20200819072402.3085022-17-lee.jones@linaro.org> (raw)
In-Reply-To: <20200819072402.3085022-1-lee.jones@linaro.org>

'tos_to_tid_inv' is only used in 2 of 17 files it's current being
included into.

Fixes the following W=1 kernel build warning(s):

 In file included from drivers/net/wireless/marvell/mwifiex/main.c:23:
 In file included from drivers/net/wireless/marvell/mwifiex/cmdevt.c:26:
 In file included from drivers/net/wireless/marvell/mwifiex/util.c:25:
 In file included from drivers/net/wireless/marvell/mwifiex/txrx.c:25:
 In file included from drivers/net/wireless/marvell/mwifiex/11n.c:25:
 In file included from drivers/net/wireless/marvell/mwifiex/wmm.c:25:
 In file included from drivers/net/wireless/marvell/mwifiex/11n_aggr.c:25:
 In file included from drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c:25:
 In file included from drivers/net/wireless/marvell/mwifiex/join.c:25:
 In file included from drivers/net/wireless/marvell/mwifiex/sta_cmd.c:25:
 In file included from drivers/net/wireless/marvell/mwifiex/sta_ioctl.c:25:
 In file included from drivers/net/wireless/marvell/mwifiex/sta_event.c:25:
 In file included from drivers/net/wireless/marvell/mwifiex/uap_txrx.c:23:
 In file included from drivers/net/wireless/marvell/mwifiex/sdio.c:27:
 In file included from drivers/net/wireless/marvell/mwifiex/sta_tx.c:25:
 drivers/net/wireless/marvell/mwifiex/wmm.h:41:17: warning: ‘tos_to_tid_inv’ defined but not used [-Wunused-const-variable=]
 41 | static const u8 tos_to_tid_inv[] = {

 NB: Snipped for brevity

Cc: Amitkumar Karwar <amitkarwar@gmail.com>
Cc: Ganapathi Bhat <ganapathi.bhat@nxp.com>
Cc: Xinming Hu <huxinming820@gmail.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/marvell/mwifiex/init.c | 16 ++++++++++++++++
 drivers/net/wireless/marvell/mwifiex/tdls.c | 16 ++++++++++++++++
 drivers/net/wireless/marvell/mwifiex/wmm.h  | 15 ---------------
 3 files changed, 32 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c
index 82d69bc3aaaf4..7ffc78b258317 100644
--- a/drivers/net/wireless/marvell/mwifiex/init.c
+++ b/drivers/net/wireless/marvell/mwifiex/init.c
@@ -25,6 +25,22 @@
 #include "wmm.h"
 #include "11n.h"
 
+/*
+ * This table inverses the tos_to_tid operation to get a priority
+ * which is in sequential order, and can be compared.
+ * Use this to compare the priority of two different TIDs.
+ */
+static const u8 tos_to_tid_inv[] = {
+	0x02,  /* from tos_to_tid[2] = 0 */
+	0x00,  /* from tos_to_tid[0] = 1 */
+	0x01,  /* from tos_to_tid[1] = 2 */
+	0x03,
+	0x04,
+	0x05,
+	0x06,
+	0x07
+};
+
 /*
  * This function adds a BSS priority table to the table list.
  *
diff --git a/drivers/net/wireless/marvell/mwifiex/tdls.c b/drivers/net/wireless/marvell/mwifiex/tdls.c
index 97bb87c3676bb..35c02b149820d 100644
--- a/drivers/net/wireless/marvell/mwifiex/tdls.c
+++ b/drivers/net/wireless/marvell/mwifiex/tdls.c
@@ -27,6 +27,22 @@
 #define TDLS_CONFIRM_FIX_LEN  6
 #define MWIFIEX_TDLS_WMM_INFO_SIZE 7
 
+/*
+ * This table inverses the tos_to_tid operation to get a priority
+ * which is in sequential order, and can be compared.
+ * Use this to compare the priority of two different TIDs.
+ */
+static const u8 tos_to_tid_inv[] = {
+	0x02,  /* from tos_to_tid[2] = 0 */
+	0x00,  /* from tos_to_tid[0] = 1 */
+	0x01,  /* from tos_to_tid[1] = 2 */
+	0x03,
+	0x04,
+	0x05,
+	0x06,
+	0x07
+};
+
 static void mwifiex_restore_tdls_packets(struct mwifiex_private *priv,
 					 const u8 *mac, u8 status)
 {
diff --git a/drivers/net/wireless/marvell/mwifiex/wmm.h b/drivers/net/wireless/marvell/mwifiex/wmm.h
index 04d7da95e3078..60bdbb82277a3 100644
--- a/drivers/net/wireless/marvell/mwifiex/wmm.h
+++ b/drivers/net/wireless/marvell/mwifiex/wmm.h
@@ -33,21 +33,6 @@ enum ieee_types_wmm_ecw_bitmasks {
 
 static const u16 mwifiex_1d_to_wmm_queue[8] = { 1, 0, 0, 1, 2, 2, 3, 3 };
 
-/*
- * This table inverses the tos_to_tid operation to get a priority
- * which is in sequential order, and can be compared.
- * Use this to compare the priority of two different TIDs.
- */
-static const u8 tos_to_tid_inv[] = {
-	0x02,  /* from tos_to_tid[2] = 0 */
-	0x00,  /* from tos_to_tid[0] = 1 */
-	0x01,  /* from tos_to_tid[1] = 2 */
-	0x03,
-	0x04,
-	0x05,
-	0x06,
-	0x07};
-
 /*
  * This function retrieves the TID of the given RA list.
  */
-- 
2.25.1


  parent reply	other threads:[~2020-08-19  7:29 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19  7:23 [PATCH 00/28] Rid W=1 warnings in Wireless Lee Jones
2020-08-19  7:23 ` [PATCH 01/28] wireless: intersil: hostap: Mark 'freq_list' as __maybe_unused Lee Jones
2020-09-01  9:03   ` [01/28] " Kalle Valo
2020-08-19  7:23 ` [PATCH 02/28] wireless: rsi_91x_main: Fix some kernel-doc issues Lee Jones
2020-08-19  7:23 ` [PATCH 03/28] wireless: rsi_91x_core: File header should not be kernel-doc Lee Jones
2020-08-19  7:23 ` [PATCH 04/28] wireless: marvell: libertas_tf: Demote non-conformant kernel-doc headers Lee Jones
2020-08-19  7:23 ` [PATCH 05/28] wireless: intel: dvm: Demote non-compliant " Lee Jones
2020-08-19  7:23 ` [PATCH 06/28] wireless: ti: wlcore: cmd: Fix some parameter description disparities Lee Jones
2020-08-19  7:23 ` [PATCH 07/28] wireless: marvell: libertas_tf: Fix a bunch of function doc formatting issues Lee Jones
2020-08-19  7:23 ` [PATCH 08/28] wireless: intel: iwlwifi: rs: Demote non-compliant kernel-doc headers Lee Jones
2020-08-19  7:23 ` [PATCH 09/28] wireless: intel: iwlegacy: debug: Demote seemingly unintentional kerneldoc header Lee Jones
2020-08-19  7:23 ` [PATCH 10/28] wireless: intel: iwlwifi: dvm: tx: Demote non-compliant kernel-doc headers Lee Jones
2020-08-19  7:23 ` [PATCH 11/28] wireless: intersil: hostap: hostap_ap: Mark 'txt' as __always_unused Lee Jones
2020-08-19  7:23 ` [PATCH 12/28] wireless: intel: iwlwifi: dvm: lib: Demote non-compliant kernel-doc headers Lee Jones
2020-08-19  7:23 ` [PATCH 13/28] wireless: st: cw1200: wsm: Remove 'dummy' variables Lee Jones
2020-08-19  7:23 ` [PATCH 14/28] wireless: marvell: libertas: Fix 'timer_list' stored private data related dot-rot Lee Jones
2020-08-19  7:23 ` [PATCH 15/28] wireless: mediatek: mt7601u: phy: Fix misnaming when documented function parameter 'dac' Lee Jones
2020-08-19  7:23   ` Lee Jones
2020-08-19 16:31   ` Jakub Kicinski
2020-08-19 16:31     ` Jakub Kicinski
2020-09-01  9:07   ` [15/28] " Kalle Valo
2020-09-01  9:07   ` Kalle Valo
2020-08-19  7:23 ` Lee Jones [this message]
2020-08-31 15:51   ` [PATCH 16/28] wireless: marvell: mwifiex: init: Move 'tos_to_tid_inv' to where it's used Kalle Valo
2020-09-08  8:49     ` Lee Jones
2020-09-08 12:02       ` Kalle Valo
     [not found]       ` <010101746d98d278-67bb0cbd-fe22-4344-8c2a-9c65e04ff501-000000@us-west-2.amazonses.com>
2020-09-08 12:17         ` Lee Jones
2020-08-19  7:23 ` [PATCH 17/28] wireless: rsi: rsi_91x_main: Fix misnamed function parameter 'rx_pkt' Lee Jones
2020-08-19  7:23 ` [PATCH 18/28] wireless: rsi: rsi_91x_mac80211: Fix a few kerneldoc misdemeanours Lee Jones
2020-08-19  7:23 ` [PATCH 19/28] wireless: intel: iwlwifi: calib: Demote seemingly unintentional kerneldoc header Lee Jones
2020-08-19  7:23 ` [PATCH 20/28] wireless: rsi: rsi_91x_mgmt: Fix a myriad of documentation issues Lee Jones
2020-08-19  7:23 ` [PATCH 21/28] wireless: ath: wil6210: debugfs: Fix a couple of formatting issues in 'wil6210_debugfs_init' Lee Jones
2020-08-25 20:56   ` merez
2020-08-27 10:21   ` Kalle Valo
2020-08-19  7:23 ` [PATCH 22/28] wireless: intel: iwlwifi: dvm: sta: Demote a bunch of nonconformant kernel-doc headers Lee Jones
2020-08-19  7:23 ` [PATCH 23/28] wireless: rsi: rsi_91x_hal: File header comments should not be kernel-doc Lee Jones
2020-08-19  7:23 ` [PATCH 24/28] wireless: intel: iwlegacy: 4965: Demote a bunch of nonconformant kernel-doc headers Lee Jones
2020-08-19  7:23 ` [PATCH 25/28] wireless: broadcom: brcmfmac: p2p: Deal with set but unused variables Lee Jones
2020-08-19  7:24 ` [PATCH 26/28] wireless: marvell: libertas: firmware: Fix misnaming for function param 'device' Lee Jones
2020-08-19  7:24 ` [PATCH 27/28] wireless: marvell: libertas_tf: if_usb: Fix function documentation formatting errors Lee Jones
2020-08-19  7:24 ` [PATCH 28/28] wireless: intersil: hostap_ioctl: Remove set but unused variable 'hostscan' Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200819072402.3085022-17-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=amitkarwar@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ganapathi.bhat@nxp.com \
    --cc=huxinming820@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.