From: Julia Lawall <julia.lawall@lip6.fr>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
Florian Fainelli <f.fainelli@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kbuild-all@01.org
Subject: [PATCH] dsa: mv88e6xxx: fix returnvar.cocci warnings
Date: Sat, 27 May 2017 06:38:14 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1705270635210.2907@hadrien> (raw)
Remove unneeded variable used to store return value.
Generated by: scripts/coccinelle/misc/returnvar.cocci
CC: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
It's a minor issue, but since there is no error, the code is a bit
misleading.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
master
head: 47936d35edbac5e58064bd15e51136050b2f2717
commit: 04aca9938255fc7097b3fb5700f408524656f2e2 [330/362] dsa: mv88e6xxx:
Enable/Disable SERDES on port enable/disable
chip.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -1982,13 +1982,12 @@ static int mv88e6xxx_port_enable(struct
struct phy_device *phydev)
{
struct mv88e6xxx_chip *chip = ds->priv;
- int err = 0;
mutex_lock(&chip->reg_lock);
mv88e6xxx_serdes_power(chip, port, true);
mutex_unlock(&chip->reg_lock);
- return err;
+ return 0;
}
static void mv88e6xxx_port_disable(struct dsa_switch *ds, int port,
next reply other threads:[~2017-05-27 4:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-27 4:38 Julia Lawall [this message]
2017-05-27 14:51 ` [PATCH] dsa: mv88e6xxx: fix returnvar.cocci warnings Andrew Lunn
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=alpine.DEB.2.20.1705270635210.2907@hadrien \
--to=julia.lawall@lip6.fr \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.