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 E7D40D8101A for ; Tue, 7 Nov 2023 06:20:10 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=XKJ/x8FPM6quN8m2AKIlHKv4ZlmuTHTiauydG/j5UuA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1699338009; v=1; b=dM4ZtUuIuQpgl/3iyEQMSUmABmwNl5/y3V0pcV5/EHhDhk4cd8fSdjUuaAjMDbJ/nkHnelRd 8pXISnajJBkhjCT3/0o4Z9rzYs39lEpa9yW8TIldnj8GeGq4PpUApZPJrOA5Shlwg4ocrOw9dJU dnDzvKrbjfBQYCWmPgBFshys= X-Received: by 127.0.0.2 with SMTP id ru2JYY7687511xQZFYH3Q8H9; Mon, 06 Nov 2023 22:20:09 -0800 X-Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by mx.groups.io with SMTP id smtpd.web11.4649.1699338008949304128 for ; Mon, 06 Nov 2023 22:20:09 -0800 X-Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7a9857c14c5so192867139f.3 for ; Mon, 06 Nov 2023 22:20:08 -0800 (PST) X-Gm-Message-State: EvEwl2JhIOR6fQWdRK9XzqIDx7686176AA= X-Google-Smtp-Source: AGHT+IFU6lFv8PDEZEaFD0IZyV39XOvzTlap5d4FdMTbbCfspKGEz/wetZjIqEILgYWGLCzuaeiTWQ== X-Received: by 2002:a05:6e02:1b05:b0:351:b22:af5c with SMTP id i5-20020a056e021b0500b003510b22af5cmr1946777ilv.32.1699338008135; Mon, 06 Nov 2023 22:20:08 -0800 (PST) X-Received: from user-Latitude-5420.dc1.ventanamicro.com ([2401:4900:1f24:775d:7335:84a5:7d11:9393]) by smtp.gmail.com with ESMTPSA id cb11-20020a0566381b0b00b00463ff175405sm1875508jab.80.2023.11.06.22.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 22:20:07 -0800 (PST) From: "Ranbir Singh" To: devel@edk2.groups.io, rsingh@ventanamicro.com Cc: Ray Ni , Veeresh Sangolli Subject: [edk2-devel] [PATCH v2 1/5] MdeModulePkg/Bus/Pci/PciBusDxe: Fix DEADCODE Coverity issue Date: Tue, 7 Nov 2023 11:49:55 +0530 Message-Id: <20231107061959.113213-2-rsingh@ventanamicro.com> In-Reply-To: <20231107061959.113213-1-rsingh@ventanamicro.com> References: <20231107061959.113213-1-rsingh@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk 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 List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: 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=dM4ZtUuI; 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 function PciHotPlugRequestNotify has two if blocks towards the end of function both containing return. Due to the parameter checks ensured at the beginning of the function, one of the two if blocks is bound to come in execution flow. Hence, the return EFI_SUCCESS; at line 2112 is redundant/deadcode. To fix it, either of line 2109 or 2112 can be deleted. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4239 Cc: Ray Ni Co-authored-by: Veeresh Sangolli Signed-off-by: Ranbir Singh Signed-off-by: Ranbir Singh --- MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/MdeModulePkg/= Bus/Pci/PciBusDxe/PciEnumerator.c index 3f8c6e6da7dc..5b71e152f3ea 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c @@ -2106,7 +2106,6 @@ PciHotPlugRequestNotify ( //=0D // End for=0D //=0D - return EFI_SUCCESS;=0D }=0D =0D return EFI_SUCCESS;=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110811): https://edk2.groups.io/g/devel/message/110811 Mute This Topic: https://groups.io/mt/102438298/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-