[v2,16/25] net/axgbe: remove unnecessary conversion to bool

Message ID 20240507124305.2318-16-venkatkumar.ande@amd.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series [v2,01/25] net/axgbe: fix mdio access for non-zero ports and CL45 PHYs |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Venkat Kumar Ande May 7, 2024, 12:42 p.m. UTC
The conversion to bool is not needed, remove it.

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Sebastian, Selwin May 20, 2024, 10:42 a.m. UTC | #1
[AMD Official Use Only - AMD Internal Distribution Only]

Acked-by: Selwin Sebastian<selwin.sebastian@amd.com>

-----Original Message-----
From: Ande, Venkat Kumar <VenkatKumar.Ande@amd.com>
Sent: Tuesday, May 7, 2024 6:13 PM
To: dev@dpdk.org
Cc: Sebastian, Selwin <Selwin.Sebastian@amd.com>; Ande, Venkat Kumar <VenkatKumar.Ande@amd.com>
Subject: [PATCH v2 16/25] net/axgbe: remove unnecessary conversion to bool

The conversion to bool is not needed, remove it.

Signed-off-by: Venkat Kumar Ande <venkatkumar.ande@amd.com>
---
 drivers/net/axgbe/axgbe_phy_impl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 87ef8b6048..2620d44dfb 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -658,7 +658,7 @@ static bool axgbe_phy_sfp_verify_eeprom(uint8_t cc_in, uint8_t *buf,
        for (cc = 0; len; buf++, len--)
                cc += *buf;

-       return (cc == cc_in) ? true : false;
+       return cc == cc_in;
 }

 static int axgbe_phy_sfp_read_eeprom(struct axgbe_port *pdata)
--
2.34.1
  

Patch

diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c
index 87ef8b6048..2620d44dfb 100644
--- a/drivers/net/axgbe/axgbe_phy_impl.c
+++ b/drivers/net/axgbe/axgbe_phy_impl.c
@@ -658,7 +658,7 @@  static bool axgbe_phy_sfp_verify_eeprom(uint8_t cc_in, uint8_t *buf,
 	for (cc = 0; len; buf++, len--)
 		cc += *buf;
 
-	return (cc == cc_in) ? true : false;
+	return cc == cc_in;
 }
 
 static int axgbe_phy_sfp_read_eeprom(struct axgbe_port *pdata)