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 C33E17803E0 for ; Wed, 27 Sep 2023 06:17:11 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=RPdYW/65dkZXh5kBpF98tdt77h3de5HqHJWhroaZxIs=; 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=1695795430; v=1; b=Hpq9uydpKuL453hEvcdPNOuaJzC7wOws2S7QPMwbkhiSUvCDJUfRkV9VLONt/txatMxI6MW6 2lpm0sqQszfz7EX63afk3n+w4IJE5Za4M10GYQQQC8SvxaF34Z6i7JcRNNbjK5v1qHoVIZfeBNd a1kSEYmoFkWXw09pB0NJYkVg= X-Received: by 127.0.0.2 with SMTP id VINhYY7687511xjguL8tQ45z; Tue, 26 Sep 2023 23:17:10 -0700 X-Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) by mx.groups.io with SMTP id smtpd.web10.11689.1695795429774258679 for ; Tue, 26 Sep 2023 23:17:09 -0700 X-Received: by mail-io1-f47.google.com with SMTP id ca18e2360f4ac-7a25040faffso6719739f.1 for ; Tue, 26 Sep 2023 23:17:09 -0700 (PDT) X-Gm-Message-State: ZK8QMPsJx4jWvdp6WFSumYFBx7686176AA= X-Google-Smtp-Source: AGHT+IGfx22+GgZf8nqdVJMxEiBRYbbTh+B+sbKea220HIDevNi1QI/v7am+hRANm5dQ6BMbWbeO1Q== X-Received: by 2002:a6b:f012:0:b0:79f:d195:5384 with SMTP id w18-20020a6bf012000000b0079fd1955384mr1307247ioc.17.1695795428922; Tue, 26 Sep 2023 23:17:08 -0700 (PDT) X-Received: from user-Latitude-5420.dc1.ventanamicro.com ([106.51.83.242]) by smtp.gmail.com with ESMTPSA id o23-20020a6b5a17000000b007836c7e8dccsm2571625iob.17.2023.09.26.23.17.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 23:17:08 -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/5] MdeModulePkg/Bus/Pci/PciBusDxe: Fix DEADCODE Coverity issue Date: Wed, 27 Sep 2023 11:46:57 +0530 Message-Id: <20230927061701.451202-2-rsingh@ventanamicro.com> In-Reply-To: <20230927061701.451202-1-rsingh@ventanamicro.com> References: <20230927061701.451202-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=Hpq9uydp; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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: Hao A Wu 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 (#109108): https://edk2.groups.io/g/devel/message/109108 Mute This Topic: https://groups.io/mt/101612807/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-