Skip to contentSkip to conversation

net: wireless/ath: Fix compile error seen with W=1

PATCH In review Guenter Roeck 2 participants 2 messages Jan 27, 2013 – Jan 28, 2013 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: wireless/ath: Fix compile error seen with W=1

make W=1 for x86_64 fails with

drivers/net/wireless/ath/wil6210/txrx.c: In function ‘wil_rx_fini’:
drivers/net/wireless/ath/wil6210/txrx.c:550:7: error: variable ‘rc’ set but not used [-Werror=unused-but-set-variable]

Fix by dropping the variable.

---
 drivers/net/wireless/ath/wil6210/txrx.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/ath/wil6210/txrx.c +1 -2
index f29c294..b6e8042 100644
@@ -547,7 +547,6 @@ void wil_rx_fini(struct wil6210_priv *wil)
 	struct vring *vring = &wil->vring_rx;
 
 	if (vring->va) {
-		int rc;
 		struct wmi_cfg_rx_chain_cmd cmd = {
 			.action = cpu_to_le32(WMI_RX_CHAIN_DEL),
 			.rx_sw_ring = {
@@ -559,7 +558,7 @@ void wil_rx_fini(struct wil6210_priv *wil)
 			struct wmi_cfg_rx_chain_done_event cfg;
 		} __packed wmi_rx_cfg_reply;
 
-		rc = wmi_call(wil, WMI_CFG_RX_CHAIN_CMDID, &cmd, sizeof(cmd),
+		(void)wmi_call(wil, WMI_CFG_RX_CHAIN_CMDID, &cmd, sizeof(cmd),
 			      WMI_CFG_RX_CHAIN_DONE_EVENTID,
 			      &wmi_rx_cfg_reply, sizeof(wmi_rx_cfg_reply),
 			      100);
Signature · 1 line
1.7.9.7

A message that is not in the archive (sent off-list or not yet received): 1359253568-15762-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org

#2 lore raw
Quoted 27 lines · Guenter Roeck

make W=1 for x86_64 fails with

drivers/net/wireless/ath/wil6210/txrx.c: In function ‘wil_rx_fini’:
drivers/net/wireless/ath/wil6210/txrx.c:550:7: error: variable ‘rc’ set but not used [-Werror=unused-but-set-variable]

Fix by dropping the variable.

---
 drivers/net/wireless/ath/wil6210/txrx.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/ath/wil6210/txrx.c +0 -1
index f29c294..b6e8042 100644
@@ -547,7 +547,6 @@ void wil_rx_fini(struct wil6210_priv *wil)
 	struct vring *vring = &wil->vring_rx;
 
 	if (vring->va) {
-		int rc;
 		struct wmi_cfg_rx_chain_cmd cmd = {
 			.action = cpu_to_le32(WMI_RX_CHAIN_DEL),
 			.rx_sw_ring = {

drivers/net/wireless/ath/wil6210/txrx.c void wil_rx_fini(struct wil6210_priv *wil) · line 564

Quoted 8 lines
drivers/net/wireless/ath/wil6210/txrx.c +1 -1
@@ -559,7 +558,7 @@ void wil_rx_fini(struct wil6210_priv *wil)
 			struct wmi_cfg_rx_chain_done_event cfg;
 		} __packed wmi_rx_cfg_reply;
 
-		rc = wmi_call(wil, WMI_CFG_RX_CHAIN_CMDID, &cmd, sizeof(cmd),
+		(void)wmi_call(wil, WMI_CFG_RX_CHAIN_CMDID, &cmd, sizeof(cmd),
 			      WMI_CFG_RX_CHAIN_DONE_EVENTID,
 			      &wmi_rx_cfg_reply, sizeof(wmi_rx_cfg_reply),
 			      100);

Thanks for finding it.

I will send series of new patches shortly. This will include changes in rx chain initialization that, among other, remove fragment you fixed. Reason is firmware API changes.

Thanks, Vladimir
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html