Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1254094 > unrolled thread

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

Started byPunit Vara <punitvara@gmail.com>
First post2015-10-22 21:00 +0200
Last post2015-10-23 16:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v5 14/15] net: wireless: ath: Remove unneeded variable ret returning 0 Punit Vara <punitvara@gmail.com> - 2015-10-22 21:00 +0200
    Re: [PATCH v5 14/15] net: wireless: ath: Remove unneeded variable ret  returning 0 Bjorn Andersson <bjorn@kryo.se> - 2015-10-23 16:40 +0200

#1254094 — [PATCH v5 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

FromPunit Vara <punitvara@gmail.com>
Date2015-10-22 21:00 +0200
Subject[PATCH v5 14/15] net: wireless: ath: Remove unneeded variable ret returning 0
Message-ID<qmtfI-2HW-19@gated-at.bofh.it>
Remove empty 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 <punitvara@gmail.com>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1254647 — Re: [PATCH v5 14/15] net: wireless: ath: Remove unneeded variable ret returning 0

FromBjorn Andersson <bjorn@kryo.se>
Date2015-10-23 16:40 +0200
SubjectRe: [PATCH v5 14/15] net: wireless: ath: Remove unneeded variable ret returning 0
Message-ID<qmLFE-4cC-29@gated-at.bofh.it>
In reply to#1254094
On Thu, Oct 22, 2015 at 11:57 AM, Punit Vara <punitvara@gmail.com> wrote:

Hi Punit,

> Remove empty line suggested by Sergei
>

A commit message is here to, in the future, help us all understand
what and why this change was made, so you should not include comments
about what you changed since a previous version of this patch.

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

You don't need to indicate what files are changed in the commit
message, as that information is already available in the body of the
commit. And the comment stats the wrong file.

> Unneeded variable: "ret". Return "0" on line 980
>
> Remove unneeded variable ret created to return zero.
>

Both of these are only reiterating what the subject already states -
in two different ways. So you can easily remove them without loosing
any information. In fact, the subject is all you need to describe the
change.

Regards,
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web