ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc()
authorJason Yan <yanaijie@huawei.com>
Tue, 5 May 2020 07:41:57 +0000 (15:41 +0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 29 May 2020 02:58:34 +0000 (19:58 -0700)
No need to convert '==' expression to bool. This fixes the following
coccicheck warning:

drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:68:11-16: WARNING:
conversion to bool not needed here

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

index 39c5e6f..17357a1 100644 (file)
@@ -64,8 +64,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
                        hw->mac.ops.check_link(hw, &speed, &link_up, false);
                        /* if link is down, assume supported */
                        if (link_up)
-                               supported = speed == IXGBE_LINK_SPEED_1GB_FULL ?
-                               true : false;
+                               supported = speed == IXGBE_LINK_SPEED_1GB_FULL;
                        else
                                supported = true;
                }