Skip to contentSkip to conversation

staging: wfx: remove variable declaration

PATCH In review Kaaira Gupta 2 participants 2 messages Mar 9, 2020 – Mar 10, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 4/7 staging: wfx: remove variable declaration

int r is uneccessarily declared and assigned to 0. Return 0 directly.

---
 drivers/staging/wfx/sta.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wfx/sta.c +1 -2
index 03d0f224ffdb..a60ac03fa73d 100644
@@ -293,7 +293,6 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	struct wfx_dev *wdev = hw->priv;
 	struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
 	int old_uapsd = wvif->uapsd_mask;
-	int ret = 0;
 
 	WARN_ON(queue >= hw->queues);
 
@@ -307,7 +306,7 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 		wfx_update_pm(wvif);
 	}
 	mutex_unlock(&wdev->conf_mutex);
-	return ret;
+	return 0;
 }
 
 int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
Signature · 1 line
2.17.1
#1 lore raw
Quoted 1 line · Kaaira Gupta

int r is uneccessarily declared and assigned to 0. Return 0 directly.

The patch looks ok, but the variable is called ret, not r.

julia

Quoted 35 lines
---
 drivers/staging/wfx/sta.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wfx/sta.c +1 -3
index 03d0f224ffdb..a60ac03fa73d 100644
@@ -293,7 +293,6 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 	struct wfx_dev *wdev = hw->priv;
 	struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv;
 	int old_uapsd = wvif->uapsd_mask;
-	int ret = 0;
 
 	WARN_ON(queue >= hw->queues);
 
@@ -307,7 +306,7 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 		wfx_update_pm(wvif);
 	}
 	mutex_unlock(&wdev->conf_mutex);
-	return ret;
+	return 0;
 }
 
 int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
--

2.17.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200309224024.GA5808%40kaaira-HP-Pavilion-Notebook.