mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers/net/phy/dp83640: remove unneeded val variable
@ 2022-01-18  7:54 cgel.zte
  2022-01-18 15:19 ` Richard Cochran
  0 siblings, 1 reply; 3+ messages in thread
From: cgel.zte @ 2022-01-18  7:54 UTC (permalink / raw)
  To: richardcochran
  Cc: andrew, hkallweit1, linux, davem, kuba, netdev, linux-kernel,
	Minghao Chi, Zeal Robot, CGEL ZTE

From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from phy_read() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-18 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18  7:54 [PATCH] drivers/net/phy/dp83640: remove unneeded val variable cgel.zte
2022-01-18 15:19 ` Richard Cochran
2022-01-18 17:15   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®