From patchwork Wed Aug 20 11:23:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 57 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=1755689048; bh=eMsow8NYEFPTkV4UkDUKbBp0wLcCtbOIqBmZ1gGl8Bk=; 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=AFm87SflhAJtXZw4AIMH9F4LVFbb2EaIsmUOJOihy6vtXfI+dhVq1tn2OG2apU6ut 5kbA3Ywf1y3tBv4svmwDEqOm/nH+mlvP+xNzMr7/z3WT+73buq1uEDbWMTzqUe+uvw nJzQWF2NKT3KtgQq5MA8EzGUwZqfFOehD2wsUkkW/byw8yfGF3z/xsBX/XHuQGOFr9 2XXowXNgXaXd7NLLHCNU9/VgA7cu1IUX2IoiTnvgdK5hodpCGc0N1Orx6c0dlzf9BB kF0Nw4NVGDtvsDb+ceDcZ6Mfp9cHeEC1i5Xw0Hu4awEdr4MtARGBN0U4z8YhJaH4kU MHgm730LxKX2g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5C079674AF for ; Wed, 20 Aug 2025 05:24:08 -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 LbQykQkq3PKo for ; Wed, 20 Aug 2025 05:24:08 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755689048; bh=eMsow8NYEFPTkV4UkDUKbBp0wLcCtbOIqBmZ1gGl8Bk=; 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=AFm87SflhAJtXZw4AIMH9F4LVFbb2EaIsmUOJOihy6vtXfI+dhVq1tn2OG2apU6ut 5kbA3Ywf1y3tBv4svmwDEqOm/nH+mlvP+xNzMr7/z3WT+73buq1uEDbWMTzqUe+uvw nJzQWF2NKT3KtgQq5MA8EzGUwZqfFOehD2wsUkkW/byw8yfGF3z/xsBX/XHuQGOFr9 2XXowXNgXaXd7NLLHCNU9/VgA7cu1IUX2IoiTnvgdK5hodpCGc0N1Orx6c0dlzf9BB kF0Nw4NVGDtvsDb+ceDcZ6Mfp9cHeEC1i5Xw0Hu4awEdr4MtARGBN0U4z8YhJaH4kU MHgm730LxKX2g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4BF95674B4 for ; Wed, 20 Aug 2025 05:24:08 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755689047; bh=CdXToqTdz3d/ir4GZ735iQau/Y6bjrmDXCcSY4QCORo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qjdo9zceY5zgyvKYndIOmjKLkIod9nlLO3o3O29jawvbtsw7uoDBXEyltWyElJT8N 23yN2RA+tyCmhnGnSsNzJTlSpHdReHE4MKqUi8NgyZXkWNDdkvtugys0WgfgTlePZg 5OnIYtRMzqH3DV3xerxbUbM/FYNdwHlkHpII0gOug3nK9OSLwQk6W3XUANqETsOuao epgViaxeg+xzG4zq5f0Qyw3wxZE4+S1/LzjHNfP8idgNSKQMl493Fn6b08V+QgFlG+ ucpcrGK9OxUAOqHIOw7/Aw88Z+rT4mld0iBEj9PZX2isPfC3VONtygZyoFK06I6GYc PhBCqyqXPejPA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4A9EE67669; Wed, 20 Aug 2025 05:24:07 -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 OBq0a1Qj4BWv; Wed, 20 Aug 2025 05:24:07 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755689045; bh=IwKaVw/LRVW9nXrmRmP8cXAjB+AwX0JsAJLUraq/M54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dfsq4DKFlxOBI7josjDc3x+ZoS8hODvg60Wo4lT7Hno20zeDzRfBykMJijxAeVh7s 4yuqbZ5ByuVKZbut/G2QjCx/dDVC8xlcKkclPPA2YL/qHooP9JqyeB9SvbYbO8HVxv q3gPBtgc61hLwzAL5cptpnGuaiFHBqn9Ew1x8OnKrOw+VswHa477DIETNpM+FQIEmu 7Z3b9LyHEE0qZYN9EDzJynfaYLQoXVpKzW02wa7W4ngrv2aEBcJqaklixVIXPBTdii qy0/XAcU1vXaNI/CM3fU8QhHtHvH0tV4XXrxSSUNSeH+Kn0YOygIxEGjJzGq3oN7Bg TN1Ftq7ZIUKjQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 669FF67671; Wed, 20 Aug 2025 05:24:05 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 20 Aug 2025 05:23:13 -0600 Message-ID: <20250820112340.147082-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250820112340.147082-1-sjg@u-boot.org> References: <20250820112340.147082-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: PXGLWGBZRLCKBL4Y5VMOZSB2EYSHUKAY X-Message-ID-Hash: PXGLWGBZRLCKBL4Y5VMOZSB2EYSHUKAY 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 v2 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()") --- (no changes since v1) 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);