From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A69ED45F08; Sat, 21 Dec 2024 19:20:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 320ED402A7; Sat, 21 Dec 2024 19:20:23 +0100 (CET) Received: from smtp.eurecom.fr (smtp.eurecom.fr [193.55.113.210]) by mails.dpdk.org (Postfix) with ESMTP id 1E45840144; Sat, 21 Dec 2024 19:20:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=eurecom.fr; i=@eurecom.fr; q=dns/txt; s=default; t=1734805222; x=1766341222; h=from:in-reply-to:references:date:cc:to:mime-version: message-id:subject:content-transfer-encoding; bh=ITckwao0Kcltsat/FJQ07Xcc/fPMWvi2xGYTmvC2H3M=; b=y6QFB8x2lxWW9uuQksW6grHtLEvNyOr+gliA6f0M77wTEMF0tNkA3uY/ tdq38ILSCXpSdjDSvxY/x0/JkQKrNBHQKbsYcQbgxMNUzY60OL5dx1bN9 xIFDU+RcNHRfA2kW4nMSX0PHEvwl5ZGNVKcUxt5OnletFNtQm2ExhUErp 4=; X-CSE-ConnectionGUID: 9Owtl4VpRRSUIow2kr8tdg== X-CSE-MsgGUID: tUR68m5zTxCJ67YRN7A5NA== X-IronPort-AV: E=Sophos;i="6.12,254,1728943200"; d="scan'208";a="28288800" Received: from quovadis.eurecom.fr ([10.3.2.233]) by drago1i.eurecom.fr with ESMTP; 21 Dec 2024 19:20:22 +0100 From: "Ariel Otilibili-Anieli" In-Reply-To: <02eaeb6f-73e9-47bf-beee-72af2ac16d23@oktetlabs.ru> Content-Type: text/plain; charset="utf-8" X-Forward: 88.183.119.157 References: <20241221132830.1100648-1-otilibil@eurecom.fr> <20241221132830.1100648-2-otilibil@eurecom.fr> <02eaeb6f-73e9-47bf-beee-72af2ac16d23@oktetlabs.ru> Date: Sat, 21 Dec 2024 19:20:21 +0100 Cc: dev@dpdk.org, stable@dpdk.org To: "Andrew Rybchenko" MIME-Version: 1.0 Message-ID: <2f7a89-67670700-c0c7-70827e80@126510310> Subject: =?utf-8?q?Re=3A?= [PATCH 1/1] =?utf-8?q?common/sfc=5Fefx/base=3A?= remove unreachable code User-Agent: SOGoMail 5.11.1 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Saturday, December 21, 2024 18:42 CET, Andrew Rybchenko wrote: > NACK >=20 > it is the base driver and corresponding code is unreachable with curr= ent > build options only. Hello Andrew, Thanks for having looked into this. It looks indeed like a false positi= ve: ``` $ awk 'NR>67 && NR<88 {print NR ":" $0}' drivers/common/sfc=5Fefx/base/= efx=5Fmon.c 68: 69: EFSYS=5FASSERT(encp->enc=5Fmon=5Ftype !=3D EFX=5FMON=5FINVALID)= ; 70: switch (emp->em=5Ftype) { 71:#if EFSYS=5FOPT=5FMON=5FMCDI 72: case EFX=5FMON=5FSFC90X0: 73: case EFX=5FMON=5FSFC91X0: 74: case EFX=5FMON=5FSFC92X0: 75: emop =3D &=5F=5Fefx=5Fmon=5Fmcdi=5Fops; 76: break; 77:#endif 78: default: 79: rc =3D ENOTSUP; 80: goto fail2; 81: } 82: 83: emp->em=5Femop =3D emop; 84: return (0); 85: 86:fail2: 87: EFSYS=5FPROBE(fail2); ``` This is the update I made in Coverity: If EFSYS=5FOPT=5FMON=5FMCDI is enabled; and emp->em=5Ftype is any of EF= X=5FMON=5FSFC90X0, EFX=5FMON=5FSFC91X0, or EFX=5FMON=5FSFC92X0; Lignes = 82 and 83 are reached. Regards, Ariel >=20 > On 12/21/24 16:27, Ariel Otilibili wrote: > > The default switch case ends with a goto; meaning these instruction= s are > > never reached. > >=20 > > Coverity issue: 121742 > > Fixes: 19b64c6ac3 ("net/sfc/base: import libefx base") > > Signed-off-by: Ariel Otilibili > > -- > > Cc: stable@dpdk.org > > Cc: Andrew Rybchenko > > --- > > drivers/common/sfc=5Fefx/base/efx=5Fmon.c | 3 --- > > 1 file changed, 3 deletions(-) > >=20 > > diff --git a/drivers/common/sfc=5Fefx/base/efx=5Fmon.c b/drivers/co= mmon/sfc=5Fefx/base/efx=5Fmon.c > > index ee449ef5eb..5706171abd 100644 > > --- a/drivers/common/sfc=5Fefx/base/efx=5Fmon.c > > +++ b/drivers/common/sfc=5Fefx/base/efx=5Fmon.c > > @@ -80,9 +80,6 @@ efx=5Fmon=5Finit( > > goto fail2; > > } > > =20 > > - emp->em=5Femop =3D emop; > > - return (0); > > - > > fail2: > > EFSYS=5FPROBE(fail2); > > =20 >