Message ID | 20200624075337.6768-5-guinanx.sun@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Qi Zhang |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A8BECA0350; Wed, 24 Jun 2020 10:02:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F8D61D8D5; Wed, 24 Jun 2020 10:01:33 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 6E2311D738 for <dev@dpdk.org>; Wed, 24 Jun 2020 10:01:29 +0200 (CEST) IronPort-SDR: z28dxN4bTpLE6RNcKkKoc4PahkEnQDDPOnGOd+uWmrRp+fl9JfvU5Zw1rVwUoHPs8s2HyWTggu /qBBiAF8I3WQ== X-IronPort-AV: E=McAfee;i="6000,8403,9661"; a="132794337" X-IronPort-AV: E=Sophos;i="5.75,274,1589266800"; d="scan'208";a="132794337" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2020 01:01:29 -0700 IronPort-SDR: suwVg3dZEm15PTJZyP6xschW6mL3RQlFUl+C2TDyUdpsRR+eo/2IIP3CFbdrjsPd6bCpC2j+N/ F0/zVm7lCoTQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,274,1589266800"; d="scan'208";a="385102624" Received: from intel.sh.intel.com ([10.239.255.48]) by fmsmga001.fm.intel.com with ESMTP; 24 Jun 2020 01:01:27 -0700 From: Guinan Sun <guinanx.sun@intel.com> To: dev@dpdk.org Cc: Jeff Guo <jia.guo@intel.com>, Wenzhuo Lu <wenzhuo.lu@intel.com>, Guinan Sun <guinanx.sun@intel.com>, Jacob Keller <jacob.e.keller@intel.com> Date: Wed, 24 Jun 2020 07:52:59 +0000 Message-Id: <20200624075337.6768-5-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200624075337.6768-1-guinanx.sun@intel.com> References: <20200622064634.70941-1-guinanx.sun@intel.com> <20200624075337.6768-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH v2 04/42] net/e1000/base: remove shadowing variable declarations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
update e1000 base code
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
Commit Message
Guinan Sun
June 24, 2020, 7:52 a.m. UTC
The variable phy_reg is already declared at the top of e1000_check_for_copper_link_ich8lan() and we don't need to re-declare it in the inner if{} scope. Remove the unnecessary extra declarations which fixes the sparse warning generated by shadowed variable names. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Guinan Sun <guinanx.sun@intel.com> --- drivers/net/e1000/base/e1000_ich8lan.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c index 5241cf698..1666826cc 100644 --- a/drivers/net/e1000/base/e1000_ich8lan.c +++ b/drivers/net/e1000/base/e1000_ich8lan.c @@ -1546,8 +1546,6 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw) if (hw->mac.type >= e1000_pch_lpt) { - u16 phy_reg; - hw->phy.ops.read_reg_locked(hw, I217_PLL_CLOCK_GATE_REG, &phy_reg); phy_reg &= ~I217_PLL_CLOCK_GATE_MASK;