[PATCH v4 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

Subsystems: atheros ath generic utilities, qualcomm wcn36xx wireless driver, the rest

STALE3969d

3 messages, 2 authors, 2015-10-26 · open the first message on its own page

[PATCH v4 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

From: Punit Vara <hidden>
Date: 2015-10-22 18:48:11

Remove black line suggested by Sergei

This patch is to the ath5k/eeprom.c that fixes up warning caught by
coccicheck:

Unneeded variable: "ret". Return "0" on line 980

Remove unneeded variable ret created to return zero.

Signed-off-by: Punit Vara <redacted>
---
 drivers/net/wireless/ath/wcn36xx/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index 900e72a..94bcc08 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -935,8 +935,6 @@ static const struct ieee80211_ops wcn36xx_ops = {
 
 static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
 {
-	int ret = 0;
-
 	static const u32 cipher_suites[] = {
 		WLAN_CIPHER_SUITE_WEP40,
 		WLAN_CIPHER_SUITE_WEP104,
@@ -977,7 +975,7 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
 	wcn->hw->sta_data_size = sizeof(struct wcn36xx_sta);
 	wcn->hw->vif_data_size = sizeof(struct wcn36xx_vif);
 
-	return ret;
+	return 0;
 }
 
 static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
-- 
2.5.3

Re: [PATCH v4 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

From: Sergei Shtylyov <hidden>
Date: 2015-10-22 18:56:54

On 10/22/2015 09:47 PM, Punit Vara wrote:
Remove black line suggested by Sergei
    Such kind of comments should be under the --- tear line.
This patch is to the ath5k/eeprom.c that fixes up warning caught by
coccicheck:

Unneeded variable: "ret". Return "0" on line 980

Remove unneeded variable ret created to return zero.

Signed-off-by: Punit Vara <redacted>
[...]

MBR, Sergei

Re: [PATCH v4 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

From: punit vara <hidden>
Date: 2015-10-26 20:00:24

On Fri, Oct 23, 2015 at 12:26 AM, Sergei Shtylyov
[off-list ref] wrote:
On 10/22/2015 09:47 PM, Punit Vara wrote:
quoted
Remove black line suggested by Sergei

   Such kind of comments should be under the --- tear line.
quoted
This patch is to the ath5k/eeprom.c that fixes up warning caught by
coccicheck:

Unneeded variable: "ret". Return "0" on line 980

Remove unneeded variable ret created to return zero.

Signed-off-by: Punit Vara <redacted>
[...]

MBR, Sergei
Thanks you Sergei for review.

Actually I didnt know You have replied to this mail because this was
gone in some other folder of my mail box .. I will send this patch
again as you suggested . Will my other patches which are already
correct be added to wireless tree ? or I have to resend everything ?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help