DriverDev-Devel Archive on
 help / color / Atom feed
* [PATCH v3] staging: rtl8723bs: Remove set but not used variable 'i'
@ 2019-10-08 23:55 zhengbin
  0 siblings, 0 replies; only message in thread
From: zhengbin @ 2019-10-08 23:55 UTC (permalink / raw)
  To: gregkh, dan.carpenter, devel; +Cc: zhengbin13

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/rtl8723bs/core/rtw_xmit.c: In function update_attrib:
drivers/staging/rtl8723bs/core/rtw_xmit.c:680:7: warning: variable i set but not used [-Wunused-but-set-variable]

It is not used since commit 554c0a3abf21 ("staging:
Add rtl8723bs sdio wifi driver")

Reported-by: Hulk Robot <>
Signed-off-by: zhengbin <>
v1->v2: remove unnecessary (void) of (void)_rtw_pktfile_read(...)
v2->v3: add the changelog for v1->v2

 drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index b5dcb78..c50d05e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -675,7 +675,6 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)

 static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib *pattrib)
-	uint i;
 	struct pkt_file pktfile;
 	struct sta_info *psta = NULL;
 	struct ethhdr etherhdr;
@@ -689,7 +688,7 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib

 	_rtw_open_pktfile(pkt, &pktfile);
-	i = _rtw_pktfile_read(&pktfile, (u8 *)&etherhdr, ETH_HLEN);
+	_rtw_pktfile_read(&pktfile, (u8 *)&etherhdr, ETH_HLEN);

 	pattrib->ether_type = ntohs(etherhdr.h_proto);


devel mailing list

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 23:55 [PATCH v3] staging: rtl8723bs: Remove set but not used variable 'i' zhengbin

DriverDev-Devel Archive on

Archives are clonable:
	git clone --mirror driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ \
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox