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>
This commit is contained in:
parent
bf2977ae01
commit
ebe65334ab
|
@ -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)
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue