netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] e1000: Remove redundant statement
@ 2021-10-18  8:53 luo penghao
  2021-10-20  9:25 ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: luo penghao @ 2021-10-18  8:53 UTC (permalink / raw)
  To: Jesse Brandeburg
  Cc: Tony Nguyen, David S . Miller, Jakub Kicinski, intel-wired-lan,
	netdev, linux-kernel, luo penghao, Zeal Robot

This statement is redundant in the context, because there will be
an identical statement next. otherwise, the variable initialization
is actually unnecessary.

The clang_analyzer complains as follows:

drivers/net/ethernet/intel/e1000/e1000_ethtool.c:1218:2 warning:

Value stored to 'ctrl_reg' is never read.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
---
 drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
index 0a57172..8951f2a 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
@@ -1215,8 +1215,6 @@ static int e1000_integrated_phy_loopback(struct e1000_adapter *adapter)
 		e1000_write_phy_reg(hw, PHY_CTRL, 0x8140);
 	}
 
-	ctrl_reg = er32(CTRL);
-
 	/* force 1000, set loopback */
 	e1000_write_phy_reg(hw, PHY_CTRL, 0x4140);
 
-- 
2.15.2



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

end of thread, other threads:[~2021-10-21  7:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-18  8:53 [PATCH linux-next] e1000: Remove redundant statement luo penghao
2021-10-20  9:25 ` Simon Horman
2021-10-20 18:08   ` [Intel-wired-lan] " Jesse Brandeburg
2021-10-21  7:09     ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).