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 57FDE78003C for ; Tue, 7 Nov 2023 06:20:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=fYbxAZLEbH4ZQ6lnQU6/v5dIIaZzbefqx9gNVPIn4hU=; 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=1699338012; v=1; b=kGUIl7I8l/rV7Qo9H9AytW35PXB/V5ZU9P0QnLJJnkOeWmD9ykVsHVUBdR8Zxn/3S6ycTWHr +08mUybuPVKFUtFbphqBzCMIWr4ALn/ITlEZ/rakmz+wlNiyrE2haisMQQ6tPWYnbdnU4+kZeyX 2mVXyay/iNvcEvxTv3Egib5E= X-Received: by 127.0.0.2 with SMTP id WNN7YY7687511xPHC3qNOxIx; Mon, 06 Nov 2023 22:20:12 -0800 X-Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by mx.groups.io with SMTP id smtpd.web11.4651.1699338011522322292 for ; Mon, 06 Nov 2023 22:20:11 -0800 X-Received: by mail-io1-f50.google.com with SMTP id ca18e2360f4ac-7a6acc8e222so200816639f.0 for ; Mon, 06 Nov 2023 22:20:11 -0800 (PST) X-Gm-Message-State: DEoMyFHZDqytH9Bb2BHghnjyx7686176AA= X-Google-Smtp-Source: AGHT+IFQ51vjpx22+f0xh21n40CKGGxZhTNWL4gA1FjLMmhw8TtreKOybf0S9ggo3QnKtsjPbMu7pA== X-Received: by 2002:a05:6602:2e96:b0:7ac:cb6b:6188 with SMTP id m22-20020a0566022e9600b007accb6b6188mr24272866iow.6.1699338010674; Mon, 06 Nov 2023 22:20:10 -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.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 22:20:10 -0800 (PST) From: "Ranbir Singh" To: devel@edk2.groups.io, rsingh@ventanamicro.com Cc: Ray Ni , Veeresh Sangolli Subject: [edk2-devel] [PATCH v2 2/5] MdeModulePkg/Bus/Pci/PciBusDxe: Fix MISSING_BREAK Coverity issues Date: Tue, 7 Nov 2023 11:49:56 +0530 Message-Id: <20231107061959.113213-3-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=kGUIl7I8; 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 UpdatePciInfo has switch-case code in which there are fall through from case 32: to case 64:. While this is seeemingly 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=3D4239 Cc: Ray Ni Co-authored-by: Veeresh Sangolli Signed-off-by: Ranbir Singh Signed-off-by: Ranbir Singh --- MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeMod= ulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c index 6594b8eae83f..eda97285ee18 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c @@ -1428,6 +1428,9 @@ UpdatePciInfo ( switch (Ptr->AddrSpaceGranularity) {=0D case 32:=0D PciIoDevice->PciBar[BarIndex].BarType =3D PciBarTypeMem3= 2;=0D + //=0D + // No break; here as this is an intentional fall through= .=0D + //=0D case 64:=0D PciIoDevice->PciBar[BarIndex].BarTypeFixed =3D TRUE;=0D break;=0D @@ -1440,6 +1443,9 @@ UpdatePciInfo ( switch (Ptr->AddrSpaceGranularity) {=0D case 32:=0D PciIoDevice->PciBar[BarIndex].BarType =3D PciBarTypePMem= 32;=0D + //=0D + // No break; here as this is an intentional fall through= .=0D + //=0D case 64:=0D PciIoDevice->PciBar[BarIndex].BarTypeFixed =3D TRUE;=0D break;=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110812): https://edk2.groups.io/g/devel/message/110812 Mute This Topic: https://groups.io/mt/102438299/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-