net: atheros: remove conversion to bool in atl1c_start_mac()
authorJason Yan <yanaijie@huawei.com>
Tue, 5 May 2020 07:45:46 +0000 (15:45 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 May 2020 18:39:42 +0000 (11:39 -0700)
No need to convert '==' expression to bool. This fixes the following
coccicheck warning:

drivers/net/ethernet/atheros/atl1c/atl1c_main.c:1189:63-68: WARNING:
conversion to bool not needed here

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/atheros/atl1c/atl1c_main.c

index 00bd7bd..04bc53a 100644 (file)
@@ -1186,7 +1186,7 @@ static void atl1c_start_mac(struct atl1c_adapter *adapter)
        struct atl1c_hw *hw = &adapter->hw;
        u32 mac, txq, rxq;
 
-       hw->mac_duplex = adapter->link_duplex == FULL_DUPLEX ? true : false;
+       hw->mac_duplex = adapter->link_duplex == FULL_DUPLEX;
        hw->mac_speed = adapter->link_speed == SPEED_1000 ?
                atl1c_mac_speed_1000 : atl1c_mac_speed_10_100;