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 5E1A794102E for ; Wed, 27 Sep 2023 06:17:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=TWiXMN61Q1DuGyt1au1yM1iPnF0sc7Qgycu7TVu+Q58=; 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=1695795433; v=1; b=qkzPzZiKLdElzCNs6QTc2WgY1ulN3GRSW2Y7WGkxcWFOqcpLKpSrOrm+oOK5UCQcU5uhRfpW qOFErwMg7AcTGncW/8a2wnf1tcVbSxuRXoTcmc7u6dKVWNOOL2+yRFXyAcQOYza7vRNkh9qxVtr 7otKliS3KLv3KHhF5hASgCZY= X-Received: by 127.0.0.2 with SMTP id 68YPYY7687511xBcGfpNB6ke; Tue, 26 Sep 2023 23:17:13 -0700 X-Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by mx.groups.io with SMTP id smtpd.web11.11916.1695795432389389929 for ; Tue, 26 Sep 2023 23:17:12 -0700 X-Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-79fb70402a7so245310339f.0 for ; Tue, 26 Sep 2023 23:17:12 -0700 (PDT) X-Gm-Message-State: geFRgl01lJSbo73tI5avJj3wx7686176AA= X-Google-Smtp-Source: AGHT+IHZUsD7m0SvVIMxqR1qyuowp2ZhjnNakqNEMlAAVBCFO6Obrlvw/IW/fRVXh9M2FB9XRMb0NA== X-Received: by 2002:a6b:dd07:0:b0:783:4e11:76d7 with SMTP id f7-20020a6bdd07000000b007834e1176d7mr937971ioc.21.1695795431478; Tue, 26 Sep 2023 23:17:11 -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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 23:17:11 -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/5] MdeModulePkg/Bus/Pci/PciBusDxe: Fix MISSING_BREAK Coverity issues Date: Wed, 27 Sep 2023 11:46:58 +0530 Message-Id: <20230927061701.451202-3-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=qkzPzZiK; 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 static analyzer tool. Just adding // No break; here as this is an intentional fallthrough. as explicit comment in between makes a reader as well as Coverity happy. 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/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 (#109109): https://edk2.groups.io/g/devel/message/109109 Mute This Topic: https://groups.io/mt/101612808/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-