[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220118075438.925768-1-chi.minghao@zte.com.cn>
Date: Tue, 18 Jan 2022 07:54:38 +0000
From: cgel.zte@...il.com
To: richardcochran@...il.com
Cc: andrew@...n.ch, hkallweit1@...il.com, linux@...linux.org.uk,
davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>, CGEL ZTE <cgel.zte@...il.com>
Subject: [PATCH] drivers/net/phy/dp83640: remove unneeded val variable
From: Minghao Chi <chi.minghao@....com.cn>
Return value from phy_read() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
---
drivers/net/phy/dp83640.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index c2d1a85ec559..4159e7cdc92c 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -226,15 +226,13 @@ static inline int broadcast_write(struct phy_device *phydev, u32 regnum,
static int ext_read(struct phy_device *phydev, int page, u32 regnum)
{
struct dp83640_private *dp83640 = phydev->priv;
- int val;
if (dp83640->clock->page != page) {
broadcast_write(phydev, PAGESEL, page);
dp83640->clock->page = page;
}
- val = phy_read(phydev, regnum);
- return val;
+ return phy_read(phydev, regnum);
}
/* Caller must hold extreg_lock. */
--
2.25.1
Powered by blists - more mailing lists