From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E8D54A0350; Mon, 22 Jun 2020 09:05:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0AF9C1C1D0; Mon, 22 Jun 2020 09:05:24 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0DF591C1AF for ; Mon, 22 Jun 2020 09:05:18 +0200 (CEST) IronPort-SDR: Kh5G9XZ6n9tS+BzWeViFsd0I0QiTL4EcVAsrio8T+Wpg65b/cfN0gjDn50D3Ms4OzDDHP4AT4o YdJWE+KkS6XQ== X-IronPort-AV: E=McAfee;i="6000,8403,9659"; a="141944691" X-IronPort-AV: E=Sophos;i="5.75,266,1589266800"; d="scan'208";a="141944691" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2020 00:05:18 -0700 IronPort-SDR: 4YX4d6WZW9q1nFyvQZfxUSxeVx36X5EiwlbOOVhWolkDNtCcofdxEY0B++ssrrb+nqwsq8uJPm 7Ar8CVGU93Vg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,266,1589266800"; d="scan'208";a="384408760" Received: from dpdk.sh.intel.com ([10.239.255.83]) by fmsmga001.fm.intel.com with ESMTP; 22 Jun 2020 00:05:16 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Jeff Guo , Zhao1 Wei , Guinan Sun , Jacob Keller Date: Mon, 22 Jun 2020 06:45:28 +0000 Message-Id: <20200622064634.70941-5-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200622064634.70941-1-guinanx.sun@intel.com> References: <20200622064634.70941-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH 04/70] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Signed-off-by: Guinan Sun --- 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; -- 2.17.1