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 B44D7941475 for ; Tue, 18 Jul 2023 09:02:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=+QtXCoFh51to2EKwk56rffGjch1ov98oVj5XvUYjve0=; 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=1689670933; v=1; b=oS/3ewZxqvXRvPUXDoKD9EWuvTWfHWXCl7XBZgpZAyf5Bc62EfgeruNqHVAxyMHZ7auEboO/ er/aE1vAc5GuvoJzQNvjkanlJZvVvxV5osGHe/8cimPiCup3FtZDIYobr+s9T/cl+ciGJvE5tdv vb7a0B6u2WmGk2ppfTXHHHgs= X-Received: by 127.0.0.2 with SMTP id UiFYYY7687511xSvCCX9XGz8; Tue, 18 Jul 2023 02:02:13 -0700 X-Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mx.groups.io with SMTP id smtpd.web10.6232.1689594870329589562 for ; Mon, 17 Jul 2023 04:54:30 -0700 X-Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-666ed230c81so4556870b3a.0 for ; Mon, 17 Jul 2023 04:54:30 -0700 (PDT) X-Gm-Message-State: fSMDvsj1G62shRO9M5T25l45x7686176AA= X-Google-Smtp-Source: APBJJlGgu3BK3HtPhHwatdrnFHAz2yv2pH05N0ICWkbFl0VroQWSYjMGig3HlbFrFG2jPgZBJAGSSA== X-Received: by 2002:a05:6a20:9709:b0:132:cc97:9fc3 with SMTP id hr9-20020a056a20970900b00132cc979fc3mr11853215pzc.60.1689594869629; Mon, 17 Jul 2023 04:54:29 -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 d7-20020aa78147000000b0063f2a5a59d1sm11762640pfn.190.2023.07.17.04.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 04:54:29 -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 2/2] MdeModulePkg/Bus/Pci/PciHostBridgeDxe: Fix MISSING_BREAK Coverity issue Date: Mon, 17 Jul 2023 17:24:20 +0530 Message-Id: <20230717115420.2291717-3-rsingh@ventanamicro.com> In-Reply-To: <20230717115420.2291717-1-rsingh@ventanamicro.com> References: <20230717115420.2291717-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="oS/3ewZx"; 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 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 as well as any static analyzer tool. Just adding // No break; here as this is an intentional fallthrough. as comment in between makes any reader as well as Coverity happy. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4212 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/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 (#107003): https://edk2.groups.io/g/devel/message/107003 Mute This Topic: https://groups.io/mt/100212117/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-