[PATCH 04/32] net: phy: micrel: drop useless assignment of dummy read

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Sep 5 02:55:29 PDT 2022


The result of the PHY read is never used and the comment suggests this
is intentional. Still static analysis warns about this, so remove the
variable assignment and leave the read. We cast it to (void) to avoid
possible future __must_check warnings.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/net/phy/micrel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index cf593ee6a6e6..8a30faa92b8a 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -554,7 +554,7 @@ static int ksz8873mll_read_status(struct phy_device *phydev)
 	int regval;
 
 	/* dummy read */
-	regval = phy_read(phydev, KSZ8873MLL_GLOBAL_CONTROL_4);
+	(void)phy_read(phydev, KSZ8873MLL_GLOBAL_CONTROL_4);
 
 	regval = phy_read(phydev, KSZ8873MLL_GLOBAL_CONTROL_4);
 
-- 
2.30.2




More information about the barebox mailing list