]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: hns: use true,false for bool variables
authorJason Yan <yanaijie@huawei.com>
Sat, 18 Apr 2020 08:42:12 +0000 (16:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Apr 2020 18:04:24 +0000 (11:04 -0700)
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>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c

index 8aace2de0cc91dd5477ee8b10a2aba65e9e40431..9a907947ba19a1cd8f59dcb28ea33893e995767d 100644 (file)
@@ -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;