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 2CA6FD802CF for ; Tue, 7 Nov 2023 05:07:02 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=8v6Pla2FEo9aG/ZwwAa3mXJ1tUpdMOGHRtLy2MeOY5g=; 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=1699333620; v=1; b=P5Mmg/VCEyzckEl0m/ok1XrlqWGU9llEdxJm/wO20Y3tfpDKDT4sNIXPt10Qo8Zvs+OeJdVU iTAjdlfMtzKpACpD5KWRAV96ELzNHL+4rGQfsj2qhhmXpx2rGnGXNt9WFGGrT+2M9XDwqs1eevn Eb33Y4leyusN0t4u218/jLAg= X-Received: by 127.0.0.2 with SMTP id NbUQYY7687511xMdYTvfZIhV; Mon, 06 Nov 2023 21:07:00 -0800 X-Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) by mx.groups.io with SMTP id smtpd.web10.4317.1699333620279443546 for ; Mon, 06 Nov 2023 21:07:00 -0800 X-Received: by mail-il1-f180.google.com with SMTP id e9e14a558f8ab-35941ccaa85so22794055ab.1 for ; Mon, 06 Nov 2023 21:07:00 -0800 (PST) X-Gm-Message-State: edH9lEx76y7XnDe9AZ8mfxNQx7686176AA= X-Google-Smtp-Source: AGHT+IGbEMpwMfh1EqJkh+q7RkFrDl6MgGiKWzRxn7xLhcKXh+U5CjFzTOdc7BjlT3pM9v10KkQQuA== X-Received: by 2002:a05:6e02:1d11:b0:352:a2f8:999a with SMTP id i17-20020a056e021d1100b00352a2f8999amr2161080ila.3.1699333619251; Mon, 06 Nov 2023 21:06:59 -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 bu10-20020a056e02350a00b00359a2d8d0d2sm1360471ilb.67.2023.11.06.21.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 21:06:59 -0800 (PST) From: "Ranbir Singh" To: devel@edk2.groups.io, rsingh@ventanamicro.com Cc: Ray Ni , Veeresh Sangolli Subject: [edk2-devel] [PATCH v2 2/2] MdeModulePkg/Bus/Pci/PciHostBridgeDxe: Fix MISSING_BREAK Coverity issue Date: Tue, 7 Nov 2023 10:36:47 +0530 Message-Id: <20231107050647.59613-3-rsingh@ventanamicro.com> In-Reply-To: <20231107050647.59613-1-rsingh@ventanamicro.com> References: <20231107050647.59613-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="P5Mmg/VC"; 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 SubmitResources has a switch-case code in which the case ACPI_ADDRESS_SPACE_TYPE_MEM: which falls through to case ACPI_ADDRESS_SPACE_TYPE_IO: if there is no scenario of return EFI_INVALID_PARAMETER; While this may be intentional, it is not evident to any general code reader why there is no break; in between. Adding // No break; here as this is an intentional fallthrough. as comment in between makes it explicit. Incidentally, the comment satisfies Coverity as well. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4212 Cc: Ray Ni Co-authored-by: Veeresh Sangolli Signed-off-by: Ranbir Singh Signed-off-by: Ranbir Singh --- MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c b/MdeMod= ulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c index 519e1369f85e..3bd91e2787fd 100644 --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c @@ -1531,6 +1531,10 @@ SubmitResources ( return EFI_INVALID_PARAMETER;=0D }=0D =0D + //=0D + // No break; here as this is an intentional fall through.=0D + //=0D +=0D case ACPI_ADDRESS_SPACE_TYPE_IO:=0D //=0D // Check aligment, it should be of the form 2^n-1=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110801): https://edk2.groups.io/g/devel/message/110801 Mute This Topic: https://groups.io/mt/102437649/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-