All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net
Cc: Sasha Neftin <sasha.neftin@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jeffrey.t.kirsher@intel.com, anthony.l.nguyen@intel.com,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Aaron Brown <aaron.f.brown@intel.com>
Subject: [net-next v2 8/8] igc: Fix static checker warning
Date: Mon, 27 Jul 2020 10:13:38 -0700	[thread overview]
Message-ID: <20200727171338.3698640-9-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20200727171338.3698640-1-anthony.l.nguyen@intel.com>

From: Sasha Neftin <sasha.neftin@intel.com>

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.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 707abf069548 ("igc: Add initial LTR support")
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index 674b8ad21fea..09cd0ec7ee87 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -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
-- 
2.26.2


  parent reply	other threads:[~2020-07-27 17:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 17:13 [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 Tony Nguyen
2020-07-27 17:13 ` [net-next v2 1/8] igc: Remove unneeded variable Tony Nguyen
2020-07-27 17:13 ` [net-next v2 2/8] igc: Add Receive Descriptor Minimum Threshold Count to clear HW counters Tony Nguyen
2020-07-27 17:13 ` [net-next v2 3/8] igc: Remove unneeded ICTXQMTC register Tony Nguyen
2020-07-27 17:13 ` [net-next v2 4/8] igc: Fix registers definition Tony Nguyen
2020-07-27 17:13 ` [net-next v2 5/8] igc: Remove ledctl_ fields from the mac_info structure Tony Nguyen
2020-07-27 17:13 ` [net-next v2 6/8] igc: Clean up " Tony Nguyen
2020-07-27 17:13 ` [net-next v2 7/8] igc: Clean up the hw_stats structure Tony Nguyen
2020-07-27 17:13 ` Tony Nguyen [this message]
2020-07-27 20:12 ` [net-next v2 0/8][pull request] 1GbE Intel Wired LAN Driver Updates 2020-07-27 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200727171338.3698640-9-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=aaron.f.brown@intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sasha.neftin@intel.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.