linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: kbuild-all@01.org, linux-wireless@vger.kernel.org, kvalo@codeaurora.org
Subject: [PATCH] mt76: fix returnvar.cocci warnings
Date: Thu, 23 Nov 2017 15:27:24 +0800	[thread overview]
Message-ID: <20171123072724.GA16591@lkp-ne02> (raw)
In-Reply-To: <20171120193549.80831-4-nbd@nbd.name>

drivers/net/wireless/mediatek/mt76/mt76x2_main.c:86:5-8: Unneeded variable: "ret". Return "0" on line 112


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: a5f6039c8f9c ("mt76: add driver code for MT76x2e")
CC: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 mt76x2_main.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
@@ -83,7 +83,6 @@ mt76x2_add_interface(struct ieee80211_hw
 	struct mt76x2_dev *dev = hw->priv;
 	struct mt76x2_vif *mvif = (struct mt76x2_vif *) vif->drv_priv;
 	unsigned int idx = 0;
-	int ret = 0;
 
 	if (vif->addr[0] & BIT(1))
 		idx = 1 + (((dev->mt76.macaddr[0] ^ vif->addr[0]) >> 2) & 7);
@@ -109,7 +108,7 @@ mt76x2_add_interface(struct ieee80211_hw
 	mvif->group_wcid.hw_key_idx = -1;
 	mt76x2_txq_init(dev, vif->txq);
 
-	return ret;
+	return 0;
 }
 
 static void

  parent reply	other threads:[~2017-11-23  7:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 19:35 [PATCH v7 0/3] mt76: add new wireless driver for MediaTek MT76x2 PCIe chips Felix Fietkau
2017-11-20 19:35 ` [PATCH v7 1/3] dt-bindings: net: add mt76 wireless device binding Felix Fietkau
2017-11-20 21:34   ` Rob Herring
2017-11-21  7:08   ` [v7,1/3] " Kalle Valo
     [not found]   ` <20171121070837.AA354607EA@smtp.codeaurora.org>
2017-11-21  8:45     ` Felix Fietkau
2017-11-20 19:35 ` [PATCH v7 2/3] mt76: add common code shared between multiple chipsets Felix Fietkau
2017-11-20 19:35 ` [PATCH v7 3/3] mt76: add driver code for MT76x2e Felix Fietkau
2017-11-23  7:05   ` kbuild test robot
2017-11-23  7:42     ` Kalle Valo
2017-11-23  7:27   ` kbuild test robot
2017-11-23  7:27   ` [PATCH] mt76: fix debugfs_simple_attr.cocci warnings kbuild test robot
2017-12-07 13:42     ` Kalle Valo
2017-12-08  1:29       ` Fengguang Wu
2017-11-23  7:27   ` kbuild test robot [this message]
2017-12-07 13:43     ` [PATCH] mt76: fix returnvar.cocci warnings Kalle Valo
  -- strict thread matches above, loose matches on Subject: below --
2017-02-02 14:04 Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171123072724.GA16591@lkp-ne02 \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).