]> git.baikalelectronics.ru Git - kernel.git/commitdiff
e1000: remove unneeded conversion to bool
authorJason Yan <yanaijie@huawei.com>
Mon, 20 Apr 2020 12:35:06 +0000 (20:35 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Apr 2020 22:45:32 +0000 (15:45 -0700)
The '==' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:

drivers/net/ethernet/intel/e1000/e1000_main.c:1479:44-49: 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/intel/e1000/e1000_main.c

index f7103356ef56288efb05b58b7671bb8f23d465ca..0d51cbc88028b797c3afdae8be1555553110c553 100644 (file)
@@ -1476,7 +1476,7 @@ static bool e1000_check_64k_bound(struct e1000_adapter *adapter, void *start,
        if (hw->mac_type == e1000_82545 ||
            hw->mac_type == e1000_ce4100 ||
            hw->mac_type == e1000_82546) {
-               return ((begin ^ (end - 1)) >> 16) != 0 ? false : true;
+               return ((begin ^ (end - 1)) >> 16) == 0;
        }
 
        return true;