From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id CAC19D80047 for ; Tue, 18 Jul 2023 09:02:12 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=qqU6ogcNewW7pvOc01Mf2VXUyWjYIZqUupbNO7825bs=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-Received:X-Gm-Message-State:X-Google-Smtp-Source:X-Received:X-Received:From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Unsubscribe:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:Content-Transfer-Encoding; s=20140610; t=1689670931; v=1; b=YzGWMHP/GzF66eFKtr4Z9+dfGX6ifJts5nMBG1hmcJFv86GhhvAYpFIynWY3AmI4MiJzeOme 9uK0MFGV7iS/b0dyr9csESNRaE5Pmlgwz68PtrVMHTBY4uERmgfXBlU679RrvBbD+xU6iBupL9f MpO2V+js0AU8+HwDG67agOP0= X-Received: by 127.0.0.2 with SMTP id pQBqYY7687511xYZgmary1oF; Tue, 18 Jul 2023 02:02:11 -0700 X-Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mx.groups.io with SMTP id smtpd.web11.6042.1689594014862113322 for ; Mon, 17 Jul 2023 04:40:14 -0700 X-Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-55bac17b442so3356470a12.3 for ; Mon, 17 Jul 2023 04:40:14 -0700 (PDT) X-Gm-Message-State: JRsfMmVprHTWT2oik6vSU9JNx7686176AA= X-Google-Smtp-Source: APBJJlEH4D00CWKvJAaFmvprWHFcvQAm7Lw7vuv3VsoRZ7m0+N8xDJI9dYanvlGEV8ncOazQQ2hyfQ== X-Received: by 2002:a17:902:ecc3:b0:1bb:1494:f7f7 with SMTP id a3-20020a170902ecc300b001bb1494f7f7mr12894911plh.23.1689594014211; Mon, 17 Jul 2023 04:40:14 -0700 (PDT) X-Received: from user-Latitude-5420.dc1.ventanamicro.com ([2401:4900:1cbd:8dd2:c2bf:93e0:5979:e5e0]) by smtp.gmail.com with ESMTPSA id l3-20020a170902cf8300b001b9ce2c3baesm12544547ply.143.2023.07.17.04.40.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 04:40:14 -0700 (PDT) From: Ranbir Singh To: devel@edk2.groups.io, rsingh@ventanamicro.com Cc: Hao A Wu , Ray Ni , Veeresh Sangolli Subject: [edk2-devel] [PATCH v1 1/1] MdeModulePkg/Bus/Pci/NvmExpressPei: Fix DEADCODE Coverity issue Date: Mon, 17 Jul 2023 17:10:08 +0530 Message-Id: <20230717114008.2290970-2-rsingh@ventanamicro.com> In-Reply-To: <20230717114008.2290970-1-rsingh@ventanamicro.com> References: <20230717114008.2290970-1-rsingh@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rsingh@ventanamicro.com Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="YzGWMHP/"; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none From: Ranbir Singh The code can reach line 65 only through the else path above at line 53. The else path already has the same NULL check at line 55 and hence the duplicate code lines are totally redundant which can be deleted. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4220 Cc: Hao A Wu Cc: Ray Ni Co-authored-by: Veeresh Sangolli Signed-off-by: Ranbir Singh Signed-off-by: Ranbir Singh --- MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiS3.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiS3.c b/MdeModu= lePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiS3.c index d704c62eaab3..1d03d4964025 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiS3.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiS3.c @@ -62,10 +62,6 @@ NvmeS3SkipThisController ( }=0D }=0D =0D - if (S3InitDevices =3D=3D NULL) {=0D - return Skip;=0D - }=0D -=0D //=0D // Only need to initialize the controllers that exist in the device list= .=0D //=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107000): https://edk2.groups.io/g/devel/message/107000 Mute This Topic: https://groups.io/mt/100212115/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-