Skip to contentSkip to conversation

mwifiex: remove unused evt_buf variable

PATCH In review Tom Rix 3 participants 4 messages Mar 29, 2023 – Mar 31, 2023

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 mwifiex: remove unused evt_buf variable

clang with W=1 reports drivers/net/wireless/marvell/mwifiex/11h.c:198:6: error: variable
'evt_buf' set but not used [-Werror,-Wunused-but-set-variable]

        u8 *evt_buf;
            ^

This variable is not used so remove it.

---
 drivers/net/wireless/marvell/mwifiex/11h.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/wireless/marvell/mwifiex/11h.c +0 -4
index b0c40a776a2e..2ea03725f188 100644
@@ -195,7 +195,6 @@ int mwifiex_11h_handle_chanrpt_ready(struct mwifiex_private *priv,
 {
 	struct host_cmd_ds_chan_rpt_event *rpt_event;
 	struct mwifiex_ie_types_chan_rpt_data *rpt;
-	u8 *evt_buf;
 	u16 event_len, tlv_len;
 
 	rpt_event = (void *)(skb->data + sizeof(u32));
@@ -208,8 +207,6 @@ int mwifiex_11h_handle_chanrpt_ready(struct mwifiex_private *priv,
 		return -1;
 	}
 
-	evt_buf = (void *)&rpt_event->tlvbuf;
-
 	while (event_len >= sizeof(struct mwifiex_ie_types_header)) {
 		rpt = (void *)&rpt_event->tlvbuf;
 		tlv_len = le16_to_cpu(rpt->header.len);
@@ -231,7 +228,6 @@ int mwifiex_11h_handle_chanrpt_ready(struct mwifiex_private *priv,
 			break;
 		}
 
-		evt_buf += (tlv_len + sizeof(rpt->header));
 		event_len -= (tlv_len + sizeof(rpt->header));
 	}
 
Signature · 1 line
2.27.0
#2 lore raw
In reply to Tom Rix
Quoted 8 lines · Tom Rix

clang with W=1 reports drivers/net/wireless/marvell/mwifiex/11h.c:198:6: error: variable
'evt_buf' set but not used [-Werror,-Wunused-but-set-variable]

        u8 *evt_buf;
            ^

This variable is not used so remove it.

There should be "wifi:" in title, but I can add that during commit.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#3 lore raw

Re: wifi: mwifiex: remove unused evt_buf variable

In reply to Tom Rix
Quoted 9 lines · Tom Rix

clang with W=1 reports drivers/net/wireless/marvell/mwifiex/11h.c:198:6: error: variable
'evt_buf' set but not used [-Werror,-Wunused-but-set-variable]

        u8 *evt_buf;
            ^

This variable is not used so remove it.

Patch applied to wireless-next.git, thanks.

074d0a1ae1fe wifi: mwifiex: remove unused evt_buf variable

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches