From patchwork Wed Sep 3 13:36:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 192 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=1756906621; bh=qw4xA4fIfcVC0Bt5ajYsScYNeTvToXXvLYtp3qNWGnY=; 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=ROmVuDUxv/ykh8orCjPQcNW2KhpItXa52FqY9UiSCHIP5GGkEPTLN2NbZTjw7H3Yf xTQMXdNrZpYtpFtMaOK0ac5jmvVqxxBI9lmYxSsuaJ584aQEy3qlrQRIqHWVeE+n1T md7FwgnBtDcARnz68+iWIBYjeIamMF1vbQiTCqIJPzorAJvrZhH+n1dxbXdbtRsanX A676KWY4Iduwv+8fORjDxqEOWHvAzLdtZ4JH1WLLELt+yKMv4bvnHosjUBJ+L5gi/N 4ja2Wm1cf/b1jjeM/HaUr1bPbZxJYiPoUI6DJtJfscdz6n5zG82p0bvQIyJqX4a0yF z3iiidRoYeh6g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 50A895FCF5 for ; Wed, 3 Sep 2025 07:37:01 -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 FM6HCvviC-dB for ; Wed, 3 Sep 2025 07:37:01 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906619; bh=qw4xA4fIfcVC0Bt5ajYsScYNeTvToXXvLYtp3qNWGnY=; 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=Dv3CyWA4P3Z7BDjP7KJY9OUKbQcTe4BMP4wHG4ePTrltJaowfh/dEukX/ZkMopvyh uHMCuRrtrl91cxnC/kxDGaRLfsdFg+EyGgseNr44bLNUXpnm6Vhs+9maJQ/F463smr gmDmfJQzaQ1UQCPlFvSP7M/raM5uyO17VYu1j8PgERkR4hqh/YEyPFd8WEWJz/Qxs0 V6WBGRJ+n1wLFmUAxyztbQ+MsRZau9F9iRUarbSQ3S/77r3EVeL+HeNqbu10xs7Xy5 efFRBZECFKLnvb0QfafDS3WElBGsdyBPldwmR24TEnqSwnSVAPI8AmGAd2K6hyJNFM OHIVBQVppDILg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 66BC867918 for ; Wed, 3 Sep 2025 07:36:59 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906617; bh=uOGv0kJCovHk8NXx6L4S3sYg6N70bNeZEmqiFtBSHv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e4Ad6SHZ2fOZXGObmNzM79CuXb4HrQsQ/vjVCXQMRRNdBmnCovZcs5dPn8cYT2PpC TZf4sKFV3Pqns4PPtnoGMjmqnejaVvHYeY+CLHKzKIj3Q1r5X9o9LLtXTaIJaJ5a9P 0vEEPwxUBsCnPP71xTdB4q0i9NHpwK0+ghFVEHELG8mqvsesYP0c4QpcQpsTwh3JKx KZuLIrOAjB1b4ooob4Wk94Aw1yfFaYodmlgk515xzl9WAv6gCH+IeL7/1RAvzxTXtC k08VkgOT/e9dVafjdWuYLqn6f974chyitRSFpTXgsyIyLFgbF5kP5FVTTJIcAWxk3J n6J/TyKAbLSRQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6AFF5678B2; Wed, 3 Sep 2025 07:36:57 -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 kNzXHDPUZYZA; Wed, 3 Sep 2025 07:36:57 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906617; bh=oNIXvkI8kuE3xoez1k4lNGVrkzEXp4UGvCRXlNePghg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hLv8L29eLQek7eobmuwoV6G7BCzTeHNXjm0UjCTlDKKPbswsUqAUuF5ml84k8CVTy n1CLFak9Um7bPULCmYgYSSALvM+YKxMy1Eve8yKN2jwwWDZ6b0ytrV6ci2WU6PkTu4 qwJb4zEfV8G3RPrnTFFsiMZ7vRFDXQhk6OaAszzIeuoQVa3nKob2ClOqb+YLmwh2f2 1SoJNgLyu4WI4Kgd/U6jZyAhhZib4cJ5mDst7clYl9UCpzQHnvxRZ5VRgFCmCHze8M GAKLDpSV0gSBHCZUiFEC/LM1peVALG4HFkcp+JSk9y9WsIBrVnGKKrfcTu3lRzeJQj xF5sOfyggRWpQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E06035FCF5; Wed, 3 Sep 2025 07:36:56 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 3 Sep 2025 07:36:03 -0600 Message-ID: <20250903133639.3235920-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250903133639.3235920-1-sjg@u-boot.org> References: <20250903133639.3235920-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: UIE33NBZXWHCFHS2TWFDLWGFRPWPZ3QZ X-Message-ID-Hash: UIE33NBZXWHCFHS2TWFDLWGFRPWPZ3QZ 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: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 03/25] smbios: Correct logic in smbios_get_header() 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 This function skips over every second table. Fix it by dropping the extra iterator update. Signed-off-by: Simon Glass Fixes: a68c0625aab ("smbios: coreboot: Update smbios_get_header() to..") --- lib/smbios-parser.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/smbios-parser.c b/lib/smbios-parser.c index 575472f95a2..d8dc25da6ce 100644 --- a/lib/smbios-parser.c +++ b/lib/smbios-parser.c @@ -71,8 +71,6 @@ const struct smbios_header *smbios_get_header(const struct smbios_info *info, header = smbios_next_table(info, header)) { if (header->type == type) return header; - - header = smbios_next_table(info, header); } return NULL;