Skip to contentSkip to conversation

net: wireless: ath: Remove unneeded variable ret returning 0

PATCH Superseded Punit Vara 2 participants 2 messages Oct 22, 2015 – Oct 23, 2015

Subsystems (3)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Punit Vara

author
#0 lore raw

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

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.

---
 drivers/net/wireless/ath/wcn36xx/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/wireless/ath/wcn36xx/main.c +0 -1
index 900e72a..94bcc08 100644
@@ -935,8 +935,6 @@ static const struct ieee80211_ops wcn36xx_ops = {
 
 static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
 {
-	int ret = 0;
#1 lore raw

On Thu, Oct 22, 2015 at 11:57 AM, Punit Vara <[email protected]> wrote:

Hi Punit,

Quoted 2 lines

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.

Quoted 3 lines

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.

Quoted 4 lines

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