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: <20180306155407.GA67333@lkp-g5>
Date:   Tue, 6 Mar 2018 23:54:07 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     kbuild-all@...org,
        Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] net: dsa: mv88e6xxx: fix boolreturn.cocci warnings

From: Fengguang Wu <fengguang.wu@...el.com>

drivers/net/dsa/mv88e6xxx/serdes.c:66:9-10: WARNING: return of 0/1 in function 'mv88e6352_port_has_serdes' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: eb755c3f6b7d ("net: dsa: mv88e6xxx: Add helper to determining if port has SERDES")
CC: Andrew Lunn <andrew@...n.ch>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

 serdes.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/net/dsa/mv88e6xxx/serdes.c
+++ b/drivers/net/dsa/mv88e6xxx/serdes.c
@@ -63,15 +63,15 @@ static bool mv88e6352_port_has_serdes(st
 	err = mv88e6xxx_port_get_cmode(chip, port, &cmode);
 	if (err) {
 		dev_err(chip->dev, "failed to read cmode\n");
-		return 0;
+		return false;
 	}
 
 	if ((cmode == MV88E6XXX_PORT_STS_CMODE_100BASE_X) ||
 	    (cmode == MV88E6XXX_PORT_STS_CMODE_1000BASE_X) ||
 	    (cmode == MV88E6XXX_PORT_STS_CMODE_SGMII))
-		return 1;
+		return true;
 
-	return 0;
+	return false;
 }
 
 int mv88e6352_serdes_power(struct mv88e6xxx_chip *chip, int port, bool on)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ