From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH] net/octeneontx: fix warnings Date: Fri, 6 Apr 2018 12:25:40 +0530 Message-ID: <20180406065539.GA16663@jerin> References: <20180405151228.16595-1-stephen@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Stephen Hemminger Return-path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0075.outbound.protection.outlook.com [104.47.36.75]) by dpdk.org (Postfix) with ESMTP id 989641CE6A for ; Fri, 6 Apr 2018 08:56:04 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20180405151228.16595-1-stephen@networkplumber.org> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Thu, 5 Apr 2018 08:12:28 -0700 > From: Stephen Hemminger > To: jerin.jacob@caviumnetworks.com > Cc: dev@dpdk.org, Stephen Hemminger > Subject: [PATCH] net/octeneontx: fix warnings > X-Mailer: git-send-email 2.16.3 > > This is fix for Coverity Devect 268319 about uninitialized speed s/Devect/defect > in an error case. Also drop unnecessary assignment. Coverity issue: 268319 Fixes: 4fac7c0a147e ("net/octeontx: add link update") CC: stable@dpdk.org with above changes in the commit log: Acked-by: Jerin Jacob > > Signed-off-by: Stephen Hemminger > --- > drivers/net/octeontx/octeontx_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c > index 90dd249a6b84..ec3438cb1941 100644 > --- a/drivers/net/octeontx/octeontx_ethdev.c > +++ b/drivers/net/octeontx/octeontx_ethdev.c > @@ -518,7 +518,6 @@ octeontx_dev_link_update(struct rte_eth_dev *dev, > struct rte_eth_link link; > int res; > > - res = 0; > PMD_INIT_FUNC_TRACE(); > > res = octeontx_port_link_status(nic); > @@ -552,6 +551,7 @@ octeontx_dev_link_update(struct rte_eth_dev *dev, > case OCTEONTX_LINK_SPEED_RESERVE1: > case OCTEONTX_LINK_SPEED_RESERVE2: > default: > + link.link_speed = ETH_SPEED_NUM_NONE; > octeontx_log_err("incorrect link speed %d", nic->speed); > break; > } > -- > 2.16.3 >