2020-05-05 07:47:09

by Jason Yan

[permalink] [raw]
Subject: [PATCH net-next] ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc()

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 <[email protected]>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 0bd1294ba517..2d896d663e3d 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -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;
}
--
2.21.1


2020-05-07 20:43:40

by Bowers, AndrewX

[permalink] [raw]
Subject: RE: [Intel-wired-lan] [PATCH net-next] ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc()

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jason Yan
Sent: Tuesday, May 5, 2020 12:42 AM
To: Kirsher, Jeffrey T <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Cc: Jason Yan <[email protected]>
Subject: [Intel-wired-lan] [PATCH net-next] ixgbe: Remove conversion to bool in ixgbe_device_supports_autoneg_fc()

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 <[email protected]>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)


Tested-by: Andrew Bowers <[email protected]>