[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210430095319.23226-3-fmdefrancesco@gmail.com>
Date: Fri, 30 Apr 2021 11:53:19 +0200
From: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
To: outreachy-kernel@...glegroups.com,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Dan Carpenter <dan.carpenter@...cle.com>
Cc: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Subject: [Outreachy kernel] [PATCH v2 2/2] staging: rtl8723bs: core: Remove set but unused variable
Removed set but unused variable. Issue detected by gcc.
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@...il.com>
---
Changes from v1: As suggested by Dan Carpenter, removed no more needed
curly braces around single statement blocks.
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index a2fdd5ea5fc4..4df03f0a1242 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 *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];
@@ -1039,13 +1039,10 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
return _FAIL;
frame_type = GetFrameSubType(pframe);
- if (frame_type == WIFI_ASSOCREQ) {
- reassoc = 0;
+ if (frame_type == WIFI_ASSOCREQ)
ie_offset = _ASOCREQ_IE_OFFSET_;
- } else { /* WIFI_REASSOCREQ */
- reassoc = 1;
+ else /* WIFI_REASSOCREQ */
ie_offset = _REASOCREQ_IE_OFFSET_;
- }
if (pkt_len < sizeof(struct ieee80211_hdr_3addr) + ie_offset)
--
2.31.1
Powered by blists - more mailing lists