Skip to contentSkip to conversation

igc: Fix static checker warning

PATCH New Sasha Neftin 2 participants 2 messages Jul 9, 2020 – Jul 21, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igc: Fix static checker warning

drivers/net/ethernet/intel/igc/igc_mac.c:424 igc_check_for_copper_link()
error: uninitialized symbol 'link'.
This patch come to fix this warning and initialize the 'link' symbol.

Fixes 707abf069548 ("igc: Add initial LTR support")
---
 drivers/net/ethernet/intel/igc/igc_mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/igc/igc_mac.c +1 -1
index 674b8ad21fea..09cd0ec7ee87 100644
@@ -355,8 +355,8 @@ void igc_rar_set(struct igc_hw *hw, u8 *addr, u32 index)
 s32 igc_check_for_copper_link(struct igc_hw *hw)
 {
 	struct igc_mac_info *mac = &hw->mac;
+	bool link = false;
 	s32 ret_val;
-	bool link;
 
 	/* We only want to go out to the PHY registers to see if Auto-Neg
 	 * has completed and/or if our link status has changed.  The
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 igc: Fix static checker warning

Quoted 10 lines

From: Intel-wired-lan <[email protected]> On Behalf Of Sasha Neftin
Sent: Thursday, July 9, 2020 12:34 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH v1 1/1] igc: Fix static checker warning

drivers/net/ethernet/intel/igc/igc_mac.c:424 igc_check_for_copper_link()
error: uninitialized symbol 'link'.
This patch come to fix this warning and initialize the 'link' symbol.

Quoted 7 lines
Fixes 707abf069548 ("igc: Add initial LTR support")
---
 drivers/net/ethernet/intel/igc/igc_mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)