lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1705270635210.2907@hadrien>
Date:   Sat, 27 May 2017 06:38:14 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Andrew Lunn <andrew@...n.ch>
cc:     netdev@...r.kernel.org,
        Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        kbuild-all@...org
Subject: [PATCH] dsa: mv88e6xxx: fix returnvar.cocci warnings

Remove unneeded variable used to store return value.

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

CC: Andrew Lunn <andrew@...n.ch>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.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,

Powered by blists - more mailing lists