Message ID | 20160930144515.1770-1-ferruh.yigit@intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Bruce Richardson |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id A6DFE56A1; Fri, 30 Sep 2016 16:45:24 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 516F82B86 for <dev@dpdk.org>; Fri, 30 Sep 2016 16:45:23 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 30 Sep 2016 07:45:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,273,1473145200"; d="scan'208"; a="1058793877" Received: from sivswdev02.ir.intel.com ([10.237.217.46]) by orsmga002.jf.intel.com with ESMTP; 30 Sep 2016 07:45:18 -0700 From: Ferruh Yigit <ferruh.yigit@intel.com> To: dev@dpdk.org Cc: Sony Chacko <sony.chacko@qlogic.com>; Harish Patil <harish.patil@qlogic.com>; Rasesh Mody <rasesh.mody@qlogic.com> Date: Fri, 30 Sep 2016 15:45:15 +0100 Message-Id: <20160930144515.1770-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.8.4 Subject: [dpdk-dev] [PATCH] net/bnx2x: fix icc build error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Ferruh Yigit
Sept. 30, 2016, 2:45 p.m. UTC
When bnx2x debug config enabled, icc (ICC) 17.0.0 20160721
gives the following compilation error:
.../drivers/net/bnx2x/elink.c(6682):
error #3656: variable "fw_ver1" may be used before its value is set
PMD_DRV_LOG(DEBUG,
^
According logic in the code, this error is a false positive,
but since this is not in the fast path, fixing compiler error by
assigning initial value to variable.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/bnx2x/elink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 9/30/2016 3:45 PM, Ferruh Yigit wrote: > When bnx2x debug config enabled, icc (ICC) 17.0.0 20160721 > gives the following compilation error: > > .../drivers/net/bnx2x/elink.c(6682): > error #3656: variable "fw_ver1" may be used before its value is set > PMD_DRV_LOG(DEBUG, > ^ > > According logic in the code, this error is a false positive, > but since this is not in the fast path, fixing compiler error by > assigning initial value to variable. > > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> > --- > drivers/net/bnx2x/elink.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c > index 149cc97..d9a72f0 100644 > --- a/drivers/net/bnx2x/elink.c > +++ b/drivers/net/bnx2x/elink.c > @@ -6645,7 +6645,7 @@ static elink_status_t elink_8073_8727_external_rom_boot(struct bnx2x_softc *sc, > uint8_t port) > { > uint32_t count = 0; > - uint16_t fw_ver1, fw_msgout; > + uint16_t fw_ver1 = 0, fw_msgout; > elink_status_t rc = ELINK_STATUS_OK; > > /* Boot port from external ROM */ > Since this is an compilation fix, I believe it is good to have this in the release, can you please review the patch? Thanks, ferruh
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com] > Sent: Monday, October 17, 2016 5:12 AM > > On 9/30/2016 3:45 PM, Ferruh Yigit wrote: > > When bnx2x debug config enabled, icc (ICC) 17.0.0 20160721 gives the > > following compilation error: > > > > .../drivers/net/bnx2x/elink.c(6682): > > error #3656: variable "fw_ver1" may be used before its value is set > > PMD_DRV_LOG(DEBUG, > > ^ > > > > According logic in the code, this error is a false positive, but since > > this is not in the fast path, fixing compiler error by assigning > > initial value to variable. > > > > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> > > --- > > drivers/net/bnx2x/elink.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c > > index 149cc97..d9a72f0 100644 > > --- a/drivers/net/bnx2x/elink.c > > +++ b/drivers/net/bnx2x/elink.c > > @@ -6645,7 +6645,7 @@ static elink_status_t > elink_8073_8727_external_rom_boot(struct bnx2x_softc *sc, > > uint8_t port) > > { > > uint32_t count = 0; > > - uint16_t fw_ver1, fw_msgout; > > + uint16_t fw_ver1 = 0, fw_msgout; > > elink_status_t rc = ELINK_STATUS_OK; > > > > /* Boot port from external ROM */ > > > > Since this is an compilation fix, I believe it is good to have this in the release, > can you please review the patch? Thanks! Acked-by: Rasesh Mody <rasesh.mody@qlogic.com> > Thanks, > ferruh
On Mon, Oct 17, 2016 at 06:04:32PM +0000, Mody, Rasesh wrote: > > From: Ferruh Yigit [mailto:ferruh.yigit@intel.com] > > Sent: Monday, October 17, 2016 5:12 AM > > > > On 9/30/2016 3:45 PM, Ferruh Yigit wrote: > > > When bnx2x debug config enabled, icc (ICC) 17.0.0 20160721 gives the > > > following compilation error: > > > > > > .../drivers/net/bnx2x/elink.c(6682): > > > error #3656: variable "fw_ver1" may be used before its value is set > > > PMD_DRV_LOG(DEBUG, > > > ^ > > > > > > According logic in the code, this error is a false positive, but since > > > this is not in the fast path, fixing compiler error by assigning > > > initial value to variable. > > > > > > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> <snip> > > > Since this is an compilation fix, I believe it is good to have this in the release, > > can you please review the patch? > > Thanks! > > Acked-by: Rasesh Mody <rasesh.mody@qlogic.com> > Applied to dpdk-next-net/rel_16_11 /Bruce
diff --git a/drivers/net/bnx2x/elink.c b/drivers/net/bnx2x/elink.c index 149cc97..d9a72f0 100644 --- a/drivers/net/bnx2x/elink.c +++ b/drivers/net/bnx2x/elink.c @@ -6645,7 +6645,7 @@ static elink_status_t elink_8073_8727_external_rom_boot(struct bnx2x_softc *sc, uint8_t port) { uint32_t count = 0; - uint16_t fw_ver1, fw_msgout; + uint16_t fw_ver1 = 0, fw_msgout; elink_status_t rc = ELINK_STATUS_OK; /* Boot port from external ROM */