Skip to content

Commit

Permalink
net: hns: use true,false for bool variables
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:

drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c:700:2-8: WARNING:
Assignment of 0/1 to bool variable
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c:702:2-8: 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>
  • Loading branch information
Jason Yan authored and David S. Miller committed Apr 20, 2020
1 parent d30e1c3 commit 6d92797
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
Original file line number Diff line number Diff line change
@@ -697,9 +697,9 @@ hns_mac_register_phydev(struct mii_bus *mdio, struct hns_mac_cb *mac_cb,
return rc;

if (!strcmp(phy_type, phy_modes(PHY_INTERFACE_MODE_XGMII)))
is_c45 = 1;
is_c45 = true;
else if (!strcmp(phy_type, phy_modes(PHY_INTERFACE_MODE_SGMII)))
is_c45 = 0;
is_c45 = false;
else
return -ENODATA;

0 comments on commit 6d92797

Please sign in to comment.