From: kbuild test robot <fengguang.wu@intel.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: kbuild-all@01.org,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
Florian Fainelli <f.fainelli@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] net: dsa: mv88e6xxx: fix boolreturn.cocci warnings
Date: Tue, 6 Mar 2018 23:54:07 +0800 [thread overview]
Message-ID: <20180306155407.GA67333@lkp-g5> (raw)
In-Reply-To: <201803062304.hS8xIhIb%fengguang.wu@intel.com>
From: Fengguang Wu <fengguang.wu@intel.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@lunn.ch>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.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)
next parent reply other threads:[~2018-03-06 15:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201803062304.hS8xIhIb%fengguang.wu@intel.com>
2018-03-06 15:54 ` kbuild test robot [this message]
2018-03-06 16:02 ` [PATCH] net: dsa: mv88e6xxx: fix boolreturn.cocci warnings Andrew Lunn
2018-03-07 18:37 ` David Miller
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=20180306155407.GA67333@lkp-g5 \
--to=fengguang.wu@intel.com \
--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 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).