Commit ebe65334 authored by Jason Yan's avatar Jason Yan Committed by David S. Miller

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bf2977ae
...@@ -2210,12 +2210,12 @@ static void b44_adjust_link(struct net_device *dev) ...@@ -2210,12 +2210,12 @@ static void b44_adjust_link(struct net_device *dev)
{ {
struct b44 *bp = netdev_priv(dev); struct b44 *bp = netdev_priv(dev);
struct phy_device *phydev = dev->phydev; struct phy_device *phydev = dev->phydev;
bool status_changed = 0; bool status_changed = false;
BUG_ON(!phydev); BUG_ON(!phydev);
if (bp->old_link != phydev->link) { if (bp->old_link != phydev->link) {
status_changed = 1; status_changed = true;
bp->old_link = phydev->link; bp->old_link = phydev->link;
} }
...@@ -2223,11 +2223,11 @@ static void b44_adjust_link(struct net_device *dev) ...@@ -2223,11 +2223,11 @@ static void b44_adjust_link(struct net_device *dev)
if (phydev->link) { if (phydev->link) {
if ((phydev->duplex == DUPLEX_HALF) && if ((phydev->duplex == DUPLEX_HALF) &&
(bp->flags & B44_FLAG_FULL_DUPLEX)) { (bp->flags & B44_FLAG_FULL_DUPLEX)) {
status_changed = 1; status_changed = true;
bp->flags &= ~B44_FLAG_FULL_DUPLEX; bp->flags &= ~B44_FLAG_FULL_DUPLEX;
} else if ((phydev->duplex == DUPLEX_FULL) && } else if ((phydev->duplex == DUPLEX_FULL) &&
!(bp->flags & B44_FLAG_FULL_DUPLEX)) { !(bp->flags & B44_FLAG_FULL_DUPLEX)) {
status_changed = 1; status_changed = true;
bp->flags |= B44_FLAG_FULL_DUPLEX; bp->flags |= B44_FLAG_FULL_DUPLEX;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment