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 87983740037 for ; Tue, 3 Oct 2023 05:39:16 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=GTjwEfM4hyAO6ySUkq2irRNyWpt+AefjVsX4jH0Ox3c=; 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=1696311555; v=1; b=sKW9vLZzfekUDExj/8U+LgQW7OjXpCPCcvzBe61/AHtReX96w5fPccW8InCeIzMNd5ggJEJn XE53aqGn0wdLWCZV7os/1y2Oh6aY62lxbkE05W6d5JlsYKM4zj1FxJamlGFZQEEqswBT2VfHS/7 PBgePO+EfWwbo6HC+HA3cjk4= X-Received: by 127.0.0.2 with SMTP id I32KYY7687511xtrv8RVVCpQ; Mon, 02 Oct 2023 22:39:15 -0700 X-Received: from mail-io1-f45.google.com (mail-io1-f45.google.com [209.85.166.45]) by mx.groups.io with SMTP id smtpd.web11.102121.1696311554629962076 for ; Mon, 02 Oct 2023 22:39:14 -0700 X-Received: by mail-io1-f45.google.com with SMTP id ca18e2360f4ac-79fe6da0095so18809739f.0 for ; Mon, 02 Oct 2023 22:39:14 -0700 (PDT) X-Gm-Message-State: kJCO9IlF14NghSArELe4HjRcx7686176AA= X-Google-Smtp-Source: AGHT+IH+ZznmZiCobImslwKMeectED/divh/lNd1mV3b56pyAtx3jkbS3N/Z77oB4QOAx7C3lAexPg== X-Received: by 2002:a6b:7314:0:b0:79f:d04d:ce59 with SMTP id e20-20020a6b7314000000b0079fd04dce59mr14412188ioh.6.1696311553723; Mon, 02 Oct 2023 22:39:13 -0700 (PDT) X-Received: from user-Latitude-5420.dc1.ventanamicro.com ([2401:4900:1f24:1bb6:6659:f2cc:738a:e8e1]) by smtp.gmail.com with ESMTPSA id gj9-20020a0566386a0900b0041627abe120sm153973jab.160.2023.10.02.22.39.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 22:39:13 -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/XhciDxe: Fix MISSING_BREAK Coverity issues Date: Tue, 3 Oct 2023 11:09:02 +0530 Message-Id: <20231003053902.27289-3-rsingh@ventanamicro.com> In-Reply-To: <20231003053902.27289-1-rsingh@ventanamicro.com> References: <20231003053902.27289-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=sKW9vLZz; 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 functions XhcInitializeEndpointContext and XhcInitializeEndpointContext64 has a switch-case code in which the case USB_ENDPOINT_CONTROL: falls through to default: 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=3D4221 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/XhciDxe/XhciSched.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pc= i/XhciDxe/XhciSched.c index 05528a478baf..2afecd40cab0 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -2979,6 +2979,9 @@ XhcInitializeEndpointContext ( // Do not support control transfer now.=0D //=0D DEBUG ((DEBUG_INFO, "XhcInitializeEndpointContext: Unsupport Contr= ol EP found, Transfer ring is not allocated.\n"));=0D + //=0D + // No break; here as this is an intentional fall through.=0D + //=0D default:=0D DEBUG ((DEBUG_INFO, "XhcInitializeEndpointContext: Unknown EP foun= d, Transfer ring is not allocated.\n"));=0D EpDesc =3D (USB_ENDPOINT_DESCRIPTOR *)((UINTN)EpDesc + EpDesc->Len= gth);=0D @@ -3182,6 +3185,9 @@ XhcInitializeEndpointContext64 ( // Do not support control transfer now.=0D //=0D DEBUG ((DEBUG_INFO, "XhcInitializeEndpointContext64: Unsupport Con= trol EP found, Transfer ring is not allocated.\n"));=0D + //=0D + // No break; here as this is an intentional fall through.=0D + //=0D default:=0D DEBUG ((DEBUG_INFO, "XhcInitializeEndpointContext64: Unknown EP fo= und, Transfer ring is not allocated.\n"));=0D EpDesc =3D (USB_ENDPOINT_DESCRIPTOR *)((UINTN)EpDesc + EpDesc->Len= gth);=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109274): https://edk2.groups.io/g/devel/message/109274 Mute This Topic: https://groups.io/mt/101729058/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-