linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ross Schmidt <ross.schm.dev@gmail.com>,
	linux-staging@lists.linux.dev
Subject: [PATCH 11/57] staging: rtl8723bs: core: rtw_mlme_ext: Deal with a bunch of unused variables
Date: Wed, 14 Apr 2021 19:10:43 +0100	[thread overview]
Message-ID: <20210414181129.1628598-12-lee.jones@linaro.org> (raw)
In-Reply-To: <20210414181129.1628598-1-lee.jones@linaro.org>

Some are used inside debug prints.  These get marked as __maybe_unused.

Others are used within #ifery.  These are defined inside the same #ifery.

Lastly, ones that are truly unused are removed entirely.

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

 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘OnAssocReq’:
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1058:17: warning: variable ‘reassoc’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘OnAction_back’:
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1792:30: warning: variable ‘reason_code’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘_linked_info_dump’:
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5393:21: warning: variable ‘psta’ set but not used [-Wunused-but-set-variable]
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘led_blink_hdl’:
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:6517:25: warning: variable ‘ledBlink_param’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ross Schmidt <ross.schm.dev@gmail.com>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index f19a15a3924b6..d1dbf234e9e02 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -1019,7 +1019,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
 	u16 capab_info;
 	struct rtw_ieee802_11_elems elems;
 	struct sta_info *pstat;
-	unsigned char 	reassoc, *p, *pos, *wpa_ie;
+	unsigned char __maybe_unused reassoc, *p, *pos, *wpa_ie;
 	unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01};
 	int		i, ie_len, wpa_ie_len, left;
 	unsigned char 	supportRate[16];
@@ -1719,7 +1719,7 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra
 	struct recv_reorder_ctrl *preorder_ctrl;
 	unsigned char 	*frame_body;
 	unsigned char 	category, action;
-	unsigned short	tid, status, reason_code = 0;
+	unsigned short	tid, status, __maybe_unused reason_code = 0;
 	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 	struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
 	u8 *pframe = precv_frame->u.hdr.rx_data;
@@ -5121,7 +5121,7 @@ void _linked_info_dump(struct adapter *padapter)
 		} else if ((pmlmeinfo->state&0x03) == _HW_STATE_AP_) {
 			struct list_head	*phead, *plist;
 
-			struct sta_info *psta = NULL;
+			struct sta_info __maybe_unused *psta = NULL;
 			struct sta_priv *pstapriv = &padapter->stapriv;
 
 			spin_lock_bh(&pstapriv->asoc_list_lock);
@@ -5980,7 +5980,8 @@ u8 set_tx_beacon_cmd(struct adapter *padapter)
 
 u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf)
 {
-	u8 evt_code, evt_seq;
+	u8 evt_seq;
+	u8 evt_code;
 	u16 evt_sz;
 	uint	*peventbuf;
 	void (*event_callback)(struct adapter *dev, u8 *pbuf);
@@ -6191,12 +6192,9 @@ u8 set_chplan_hdl(struct adapter *padapter, unsigned char *pbuf)
 
 u8 led_blink_hdl(struct adapter *padapter, unsigned char *pbuf)
 {
-	struct LedBlink_param *ledBlink_param;
-
 	if (!pbuf)
 		return H2C_PARAMETERS_ERROR;
 
-	ledBlink_param = (struct LedBlink_param *)pbuf;
 	return	H2C_SUCCESS;
 }
 
-- 
2.27.0


  parent reply	other threads:[~2021-04-14 18:12 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 18:10 [PATCH 00/57] Rid W=1 warnings from Staging Lee Jones
2021-04-14 18:10 ` [PATCH 01/57] staging: r8192U_core: Remove unused variable 'ret' and demote kernel-doc abuse Lee Jones
2021-04-14 18:10 ` [PATCH 02/57] staging: android: ashmem: Supply description for 'new_range' Lee Jones
2021-04-15 16:30   ` Todd Kjos
2021-04-14 18:10 ` [PATCH 03/57] staging: comedi_8254: Fix descriptions for 'i8254' and 'iobase' Lee Jones
2021-04-14 18:10 ` [PATCH 04/57] staging: r8192U_core: Do not use kernel-doc formatting for !kernel-doc headers Lee Jones
2021-04-14 18:10 ` [PATCH 05/57] staging: r819xU_phy: Remove some local variables from the stack Lee Jones
2021-04-14 18:10 ` [PATCH 06/57] staging: r819xU_cmdpkt: Remove functionless method 'cmpk_handle_query_config_rx' Lee Jones
2021-04-14 18:10 ` [PATCH 07/57] staging: wlan-ng: cfg80211: Move large struct onto the heap Lee Jones
2021-04-14 18:10 ` [PATCH 08/57] staging: rtw_ioctl_set: Move 'channel_table' to the only place it's used Lee Jones
2021-04-14 18:10 ` [PATCH 09/57] staging: rtl8188eu: core: rtw_ieee80211: Fix incorrectly documented function Lee Jones
2021-04-14 18:10 ` [PATCH 10/57] staging: rtl8723bs: core: rtw_mlme: Remove a bunch of unused variables Lee Jones
2021-04-14 18:10 ` Lee Jones [this message]
2021-04-14 18:10 ` [PATCH 12/57] staging: rtl8712: rtl871x_mp_ioctl: Remove a bunch of unused tables Lee Jones
2021-04-14 18:10 ` [PATCH 13/57] staging: rtl8723bs: core: rtw_recv: Mark debug variable as __maybe_unused Lee Jones
2021-04-14 18:10 ` [PATCH 14/57] staging: rtl8188eu: core: rtw_security: Fix some formatting and misdocumentation Lee Jones
2021-04-14 18:10 ` [PATCH 15/57] staging: rtl8723bs: core: rtw_security: Demote non-conformant kernel-doc header Lee Jones
2021-04-15  8:09   ` Fabio Aiuto
2021-04-15  8:31     ` Lee Jones
2021-04-15  8:38       ` Fabio Aiuto
2021-04-14 18:10 ` [PATCH 16/57] staging: rtl8723bs: core: rtw_sta_mgt: Remove unused variable 'psta' Lee Jones
2021-04-14 18:10 ` [PATCH 17/57] staging: rtl8723bs: core: rtw_sta_mgt: Return error value directly Lee Jones
2021-04-14 18:10 ` [PATCH 18/57] staging: octeon: ethernet-tx: Fix formatting issue in function header Lee Jones
2021-04-14 18:10 ` [PATCH 19/57] staging: rtl8723bs: core: rtw_wlan_util: Remove unused variable 'start_seq' Lee Jones
2021-04-14 18:10 ` [PATCH 20/57] staging: rtl8712: rtl871x_mp_ioctl: Move a large data struct onto the heap Lee Jones
2021-04-14 18:10 ` [PATCH 21/57] staging: iio: frequency: ad9834: Provide missing description for 'devid' Lee Jones
2021-04-16 17:29   ` Jonathan Cameron
2021-04-14 18:10 ` [PATCH 22/57] staging: nvec: Fix a bunch of kernel-doc issues Lee Jones
2021-04-14 18:10 ` [PATCH 23/57] staging: ks7010: ks_hostif: Remove a bunch of unused variables Lee Jones
2021-04-14 18:10 ` [PATCH 24/57] staging: fwserial: Demote a whole host of kernel-doc abuses Lee Jones
2021-04-14 18:10 ` [PATCH 25/57] staging: sm750fb: sm750_accel: Provide description for 'accel' and fix function naming Lee Jones
2021-04-14 18:10 ` [PATCH 26/57] staging: most: net: Fix some kernel-doc formatting issues Lee Jones
2021-04-14 18:10 ` [PATCH 27/57] staging: vt6655: upc: Suppress set but not used warning in macro Lee Jones
2021-04-14 18:11 ` [PATCH 28/57] staging: rtl8192u: ieee80211_softmac: Move a large data struct onto the heap Lee Jones
2021-04-14 18:11 ` [PATCH 29/57] staging: most: dim2: Provide missing descriptions and fix doc-rot Lee Jones
2021-04-14 18:11 ` [PATCH 30/57] staging: rtl8723bs: core: rtw_ieee80211: Remove seemingly pointless copy Lee Jones
2021-04-14 18:11 ` [PATCH 31/57] staging: rtl8723bs: core: rtw_mlme: 'retry' is only used if REJOIN is set Lee Jones
2021-04-14 18:11 ` [PATCH 32/57] staging: rtl8723bs: core: rtw_mlme_ext: 'evt_seq' is only used if CHECK_EVENT_SEQ " Lee Jones
2021-04-14 18:11 ` [PATCH 33/57] staging: most: i2c: Fix a little doc-rot Lee Jones
2021-04-14 18:11 ` [PATCH 34/57] staging: most: dim2: hal: Fix one kernel-doc header and demote two non-conforming ones Lee Jones
2021-04-14 18:11 ` [PATCH 35/57] staging: most: dim2: hal: Demote non-conformant kernel-doc headers Lee Jones
2021-04-14 18:11 ` [PATCH 36/57] staging: axis-fifo: axis-fifo: Fix some formatting issues Lee Jones
2021-04-14 18:11 ` [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap Lee Jones
2021-04-15  5:20   ` Dan Carpenter
2021-04-15  5:25     ` Dan Carpenter
2021-04-19 14:05       ` Arnd Bergmann
2021-04-15  5:53     ` Dan Carpenter
2021-04-15  8:32       ` Lee Jones
2021-04-14 18:11 ` [PATCH 38/57] staging: fbtft: fb_ili9320: Remove unused variable 'ret' Lee Jones
2021-04-14 18:11 ` [PATCH 39/57] staging: rtl8723bs: core: rtw_ieee80211: Fix incorrectly named function Lee Jones
2021-04-14 18:11 ` [PATCH 40/57] staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable and dead code Lee Jones
2021-04-14 18:11 ` [PATCH 41/57] staging: rtl8188eu: os_dep: mon: Demote non-conforming kernel-doc headers Lee Jones
2021-04-14 18:11 ` [PATCH 42/57] staging: rtl8188eu: os_dep: rtw_android: Demote kernel-doc abuse Lee Jones
2021-04-14 18:11 ` [PATCH 43/57] staging: rtl8723bs: hal: rtl8723b_hal_init: Remove unused variable and dead code Lee Jones
2021-04-14 18:11 ` [PATCH 44/57] staging: rtl8723bs: hal: rtl8723b_phycfg: Fix a bunch of misnamed functions Lee Jones
2021-04-14 18:11 ` [PATCH 45/57] staging: rtl8723bs: hal: sdio_halinit: 'start' is only used if debug is enabled Lee Jones
2021-04-14 18:11 ` [PATCH 46/57] staging: rtl8723bs: hal: sdio_ops: Mark used 'err' as __maybe_unused and remove another Lee Jones
2021-04-14 18:11 ` [PATCH 47/57] staging: rtl8723bs: os_dep: ioctl_cfg80211: 'ack' is used when debug is enabled Lee Jones
2021-04-14 18:11 ` [PATCH 48/57] staging: comedi: drivers: jr3_pci: Remove set but unused variable 'min_full_scale' Lee Jones
2021-04-15  9:33   ` Ian Abbott
2021-04-15  9:52     ` Lee Jones
2021-04-14 18:11 ` [PATCH 49/57] staging: comedi: drivers: ni_tio: Fix slightly broken kernel-doc and demote others Lee Jones
2021-04-14 18:11 ` [PATCH 50/57] staging: comedi: drivers: ni_routes: Demote non-conforming kernel-doc headers Lee Jones
2021-04-14 18:11 ` [PATCH 51/57] staging: axis-fifo: axis-fifo: Fix function naming in the documentation Lee Jones
2021-04-14 18:11 ` [PATCH 52/57] staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable 'func_start' Lee Jones
2021-04-14 18:11 ` [PATCH 53/57] staging: rtl8723bs: core: rtw_mlme_ext: Move very large data buffer onto the heap Lee Jones
2021-04-14 18:11 ` [PATCH 54/57] staging: rtl8723bs: hal: rtl8723b_hal_init: Mark a bunch of debug variables as __maybe_unused Lee Jones
2021-04-14 18:11 ` [PATCH 55/57] staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used Lee Jones
2021-04-15  6:55   ` Uwe Kleine-König
2021-04-15  8:34     ` Lee Jones
2021-04-15  9:39   ` Ian Abbott
2021-04-15  9:54     ` Lee Jones
2021-04-14 18:11 ` [PATCH 56/57] staging: comedi: drivers: comedi_isadma: Fix misspelling of 'dma_chan1' Lee Jones
2021-04-14 18:11 ` [PATCH 57/57] staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret' Lee Jones
2021-04-15  9:16   ` Fabio Aiuto
2021-04-15  9:53     ` Lee Jones
2021-04-16  7:27 ` [PATCH 00/57] Rid W=1 warnings from Staging Fabio Aiuto
2021-04-16  7:31   ` Greg Kroah-Hartman
2021-04-27  9:31 ` Greg Kroah-Hartman

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=20210414181129.1628598-12-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=ross.schm.dev@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).