summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJason Yan <yanaijie@huawei.com>2020-09-19 15:45:27 +0800
committerDavid S. Miller <davem@davemloft.net>2020-09-19 14:23:13 -0700
commitebe65334abc89bcccc0d574e9957752ed910c52e (patch)
treed67b86929fb9a8697eb202c9dbb4e8368dbda269 /drivers/net
parentbf2977ae01f5477401160f4ca69f66859127fb7d (diff)
downloadlinux-ebe65334abc89bcccc0d574e9957752ed910c52e.tar.gz
linux-ebe65334abc89bcccc0d574e9957752ed910c52e.tar.bz2
linux-ebe65334abc89bcccc0d574e9957752ed910c52e.zip
net: b44: use true,false for bool variables
This addresses the following coccinelle warning: drivers/net/ethernet/broadcom/b44.c:2213:6-20: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/b44.c:2218:2-16: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/b44.c:2226:3-17: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/broadcom/b44.c:2230:3-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/broadcom/b44.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index 6fb620e25208..74c1778d841e 100644
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -2210,12 +2210,12 @@ static void b44_adjust_link(struct net_device *dev)
{
struct b44 *bp = netdev_priv(dev);
struct phy_device *phydev = dev->phydev;
- bool status_changed = 0;
+ bool status_changed = false;
BUG_ON(!phydev);
if (bp->old_link != phydev->link) {
- status_changed = 1;
+ status_changed = true;
bp->old_link = phydev->link;
}
@@ -2223,11 +2223,11 @@ static void b44_adjust_link(struct net_device *dev)
if (phydev->link) {
if ((phydev->duplex == DUPLEX_HALF) &&
(bp->flags & B44_FLAG_FULL_DUPLEX)) {
- status_changed = 1;
+ status_changed = true;
bp->flags &= ~B44_FLAG_FULL_DUPLEX;
} else if ((phydev->duplex == DUPLEX_FULL) &&
!(bp->flags & B44_FLAG_FULL_DUPLEX)) {
- status_changed = 1;
+ status_changed = true;
bp->flags |= B44_FLAG_FULL_DUPLEX;
}
}