* [PATCH] mt76: fix returnvar.cocci warnings
@ 2017-02-02 14:04 Julia Lawall
0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2017-02-02 14:04 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, kvalo, kbuild-all
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
CC: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mt76: fix returnvar.cocci warnings
2017-11-23 7:27 ` [PATCH] mt76: fix returnvar.cocci warnings kbuild test robot
@ 2017-12-07 13:43 ` Kalle Valo
0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2017-12-07 13:43 UTC (permalink / raw)
To: kbuild test robot; +Cc: Felix Fietkau, kbuild-all, linux-wireless
kbuild test robot <lkp@intel.com> writes:
> 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>
Here als the same problem with mismatching From and s-o-b lines.
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] mt76: fix returnvar.cocci warnings
2017-11-20 19:35 [PATCH v7 3/3] mt76: add driver code for MT76x2e Felix Fietkau
@ 2017-11-23 7:27 ` kbuild test robot
2017-12-07 13:43 ` Kalle Valo
0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2017-11-23 7:27 UTC (permalink / raw)
To: Felix Fietkau; +Cc: kbuild-all, linux-wireless, kvalo
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-07 13:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02 14:04 [PATCH] mt76: fix returnvar.cocci warnings Julia Lawall
2017-11-20 19:35 [PATCH v7 3/3] mt76: add driver code for MT76x2e Felix Fietkau
2017-11-23 7:27 ` [PATCH] mt76: fix returnvar.cocci warnings kbuild test robot
2017-12-07 13:43 ` Kalle Valo
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).