From patchwork Wed Aug 20 00:40:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 39 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650465; bh=FqRo1z80ecODAo/IQS7s9gvXK5+DoXEGsWkkclL1ZGw=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=g4qjdrF4nZaTC7yoXQCVTUN12nDJDBoz6xAuXXKuTwMAdaMqx9bsg7xwoinDRd4wi Cq8v8gDaUjTVmR9TiDS5kTNQCuJV6mo1Bx8bqAX7qW4xIhzMNSaCQIwAvr+jTi+HL0 GZ10Dq8eRBkM/Q3siJHCUgHZr/KKPXJW7JkeDzzeMo9zMVomYMn8Ygf5i6HtPmX1b3 K9KrCE1YYrJc2g3tDaqMvo54DXb3B/+StqNI8EaOD1jtlosecnEcF9ri30cHbp3vFu KjDA+tRpX0RBwxTw0Rh0Z75VqvVpWOe0AHqxxZqXFW4LnZHdLB88alIFCtlc8qdF77 ZH/a0Ju4n0VeA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EABF467650 for ; Tue, 19 Aug 2025 18:41:05 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id InbGoBKuZZq4 for ; Tue, 19 Aug 2025 18:41:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650465; bh=FqRo1z80ecODAo/IQS7s9gvXK5+DoXEGsWkkclL1ZGw=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=g4qjdrF4nZaTC7yoXQCVTUN12nDJDBoz6xAuXXKuTwMAdaMqx9bsg7xwoinDRd4wi Cq8v8gDaUjTVmR9TiDS5kTNQCuJV6mo1Bx8bqAX7qW4xIhzMNSaCQIwAvr+jTi+HL0 GZ10Dq8eRBkM/Q3siJHCUgHZr/KKPXJW7JkeDzzeMo9zMVomYMn8Ygf5i6HtPmX1b3 K9KrCE1YYrJc2g3tDaqMvo54DXb3B/+StqNI8EaOD1jtlosecnEcF9ri30cHbp3vFu KjDA+tRpX0RBwxTw0Rh0Z75VqvVpWOe0AHqxxZqXFW4LnZHdLB88alIFCtlc8qdF77 ZH/a0Ju4n0VeA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DA0696764B for ; Tue, 19 Aug 2025 18:41:05 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650464; bh=Kpj+CKljDtCr+xR/kUcZk4X38xfGWLGBnmqYCc2qhpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZaiaFZ0GiOx9BROtoqLNPoEzf1UVphVCAGDA9XbwtzTlPxZKvIpaqwuLA7mrFPSCX 2hMHiq0LkaE5fw1q4Lv5zfJXA4YkYbZHFJ06pImX/qen2tWQ12ez9JgMBRqUefegP5 gATyRPEEP5cf3Q2kQxO9F15qaXVssK3fQUCcfI8U7qhNhCvaQNHPZUuEKUWpbQwwNL ZpIeQFV0j64oqaQae+5xo6lfd/6SBKW1pSVMqJStzvpC6JFnfwcRxYU5gay/RBoDr8 pTEtcyqeL0ykr+kUNPEPO9fuS/RaCcIVSQWFjF08SlFcyz0BrCIF9BCE+o7WefnwCa WjFpTz09iqq+g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1DF91675C0; Tue, 19 Aug 2025 18:41:04 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id N4N2J6w16Ox4; Tue, 19 Aug 2025 18:41:04 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755650460; bh=DH5/qcr/LtZNgX3JBkzIkAp90RZGNtSaJWt9rMUMqcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SAG7x1jER0eVmhOtMJKJwm3N5o783sj0uh9i535NilVj+R1uatJEHY90QyJhO4lTG QykzT5sBVKAll1BWByNEOSLkwKm44ez325XG/TMgBITbPo5TMYrG8antOKuP4hfh29 em5tD2pxsIf6GfE43djnbJtmaIqGSwdxhVDGLiS3I5GoMHjuLweKEBkftuNWnNF+oE 60GdDn+FYFzGl4lFdAd9xSerdvkah1lFLMo9OO8V/vKkHkZ0DWuJKutNC4gpw2mb7w yVr3lo7/YVK9QqIcAJp4ZBRTgZH4/+d0i427nMPRzhzD23o7Exuvt8DjNHdNhmtCfF w6VXiF+qKhe4Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id CA5AD6749C; Tue, 19 Aug 2025 18:40:59 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 19 Aug 2025 18:40:15 -0600 Message-ID: <20250820004039.3920254-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250820004039.3920254-1-sjg@u-boot.org> References: <20250820004039.3920254-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: FIG5TZMOFFNRI3BZ3UDOOAKLSQF5YSTN X-Message-ID-Hash: FIG5TZMOFFNRI3BZ3UDOOAKLSQF5YSTN X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/18] efi: Add missing break statements in dp_size() List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The conversion to using a size variable was missing a break statement for the BLK case. Fix it. Signed-off-by: Simon Glass Fixes: ffde1a39228 ("efi: Use variables in dp_size()") --- lib/efi/device_path.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/efi/device_path.c b/lib/efi/device_path.c index 4c2c0bb614f..d1fdd0fba81 100644 --- a/lib/efi/device_path.c +++ b/lib/efi/device_path.c @@ -328,7 +328,7 @@ bool efi_dp_is_multi_instance(const struct efi_device_path *dp) __maybe_unused static unsigned int dp_size(struct udevice *dev) { - uint parent_size, size; + uint parent_size, size = 0; if (!dev || !dev->driver) return sizeof(struct efi_device_path_udevice); @@ -374,6 +374,7 @@ __maybe_unused static unsigned int dp_size(struct udevice *dev) size = sizeof(struct efi_device_path_udevice); break; } + break; case UCLASS_MMC: if (IS_ENABLED(CONFIG_MMC)) size = sizeof(struct efi_device_path_sd_mmc_path);