Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1651754 > unrolled thread
| Started by | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| First post | 2017-05-27 06:40 +0200 |
| Last post | 2017-05-27 17:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] dsa: mv88e6xxx: fix returnvar.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2017-05-27 06:40 +0200
Re: [PATCH] dsa: mv88e6xxx: fix returnvar.cocci warnings Andrew Lunn <andrew@lunn.ch> - 2017-05-27 17:00 +0200
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Date | 2017-05-27 06:40 +0200 |
| Subject | [PATCH] dsa: mv88e6xxx: fix returnvar.cocci warnings |
| Message-ID | <tLBGa-6UK-1@gated-at.bofh.it> |
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,
[toc] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2017-05-27 17:00 +0200 |
| Message-ID | <tLLm9-5lF-11@gated-at.bofh.it> |
| In reply to | #1651754 |
On Sat, May 27, 2017 at 06:38:14AM +0200, Julia Lawall wrote:
> Remove unneeded variable used to store return value.
>
> Generated by: scripts/coccinelle/misc/returnvar.cocci
Hi Julia
Thanks for the patch. However, Vivien already submitted a patch.
Andrew
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web