| Message ID | 20251230234134.906477-16-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=1767138318; bh=s83aFXmrjg2ogJV7kCD58L8XeHsBaXli5tnd3EAQW6g=; 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=NQi9IVPLRxxeN3QPdTFeLnfx5TeSI2pDZ1gkEawTmfRKNLgfj4zEuwU9ys3DPAfyC qxmGTHlrSY6HV+C+Bz/uCsdoSEB3qzZYP3yUQLS5LZ9P1QV+iN/dXo97W0qxgskPUe fixiV5fV82qbeiZAc41WPWWVDSd0D9Gx0GbxBZVuQMAW0t4mLHtiHvL2UEW9MRcfue s4SzjYGT/Z8uqbButpot3FJ1EGHBpyC/b/i2SiOuefiALKWTUYyLQTKk5rLM4BZvSt eShOs4KuFYCzwweQAOTgPf+nTylvO+7ue3aYUoaExfPb32anMxRSI0A/hvtjMlIkbg bum918qy2goYA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F15C264E2A for <u-boot-concept@u-boot.org>; Tue, 30 Dec 2025 16:45:18 -0700 (MST) 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 aYCrV0ocULpr for <u-boot-concept@u-boot.org>; Tue, 30 Dec 2025 16:45:18 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767138318; bh=s83aFXmrjg2ogJV7kCD58L8XeHsBaXli5tnd3EAQW6g=; 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=NQi9IVPLRxxeN3QPdTFeLnfx5TeSI2pDZ1gkEawTmfRKNLgfj4zEuwU9ys3DPAfyC qxmGTHlrSY6HV+C+Bz/uCsdoSEB3qzZYP3yUQLS5LZ9P1QV+iN/dXo97W0qxgskPUe fixiV5fV82qbeiZAc41WPWWVDSd0D9Gx0GbxBZVuQMAW0t4mLHtiHvL2UEW9MRcfue s4SzjYGT/Z8uqbButpot3FJ1EGHBpyC/b/i2SiOuefiALKWTUYyLQTKk5rLM4BZvSt eShOs4KuFYCzwweQAOTgPf+nTylvO+7ue3aYUoaExfPb32anMxRSI0A/hvtjMlIkbg bum918qy2goYA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CF6FF68F99 for <u-boot-concept@u-boot.org>; Tue, 30 Dec 2025 16:45:18 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767138314; bh=wRD8Rv1mOZQ7633pk8bcH9L1+6McRElqoEADT34jcQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h4+Br9LfXF0UGwkhd5jwgKX+zqjkMAjXqwqvW0whjm7g1aXMsOOPzQqHz8qmv9yWG k9Rm1ZKxwvu4Ur0HW8CxousFPSSfjiagPd8bnxwOs7Bs6qQ5AuCcIqPgudRWonN7kZ 208mnKf3jg1h2CtaAFRrkKoftkQM/8GjU5jYRU3REvXA6Lcgu0lNcxqIwmqkB/EOJc kzVdfiIBwsqr1Af+wyVmUMYifxJ1DISpzh33QuJ7rSs9zH9Syl8YW3WqbzCTjj2QJ1 0Pp76/o7HmSmRXTdnGyd4Q8i5b+lyUozpxU48Yv43LdGkaA9D84bX3nGWySt0rKYpl Uxv1BUoa6vHJQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A8F4468C0F; Tue, 30 Dec 2025 16:45:14 -0700 (MST) 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 62jsYF0EK-NW; Tue, 30 Dec 2025 16:45:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767138314; bh=ZEsWo2niiG/dVcsBedniMslpjgzJawtaHo9TJwhTINw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MvKHW0HmNOHF/dVOeeiNrFmr72Lnfc34ZmlfCEbVBpJ7Nh8VC989wXiVcmjfxCgvQ edVafj6813Gc9LhOsqFyY2gD4lxmV+rhzG5FJ3BSEzdINWH34/A7ylHlqIdXbqthWH UM9LGmUYUIoV/uRX8FJrM7+FrQ7SBF8PZoGiqyzg8b+EeLzEbEVawgztLc+fUAFVUF rnwF55nH1kLz1CsVMpzad5mmpcAZ8zpCMH2BAN2+hhYu5doBEGBjg5S2UTcIPDqh18 tWSJF6gKQeYyJypLSnwyQWprMTolhgOhZddoj4XMO1l+hQ93aU2rAyTLNZyi/SR/eK eLzYDMZefY7Jw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0050964E2A; Tue, 30 Dec 2025 16:45:13 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Tue, 30 Dec 2025 16:41:27 -0700 Message-ID: <20251230234134.906477-16-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251230234134.906477-1-sjg@u-boot.org> References: <20251230234134.906477-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TSYPDBOND4D63OG3PXG666FLJBTZML4P X-Message-ID-Hash: TSYPDBOND4D63OG3PXG666FLJBTZML4P 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 <simon.glass@canonical.com>, Claude <noreply@anthropic.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 15/15] ext4l: Fix cmpxchg macro warning with clang List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/TSYPDBOND4D63OG3PXG666FLJBTZML4P/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
ext4l: Infrastructure and fixes for write support (part K)
|
|
Commit Message
Simon Glass
Dec. 30, 2025, 11:41 p.m. UTC
From: Simon Glass <simon.glass@canonical.com> Rename local variables in cmpxchg macro to avoid shadowing when used inside try_cmpxchg, which also declares __old. Clang complains about "variable '__old' is uninitialised when used within its own initialisation" due to the nested macro expansion. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 2d0e817be40..087d8394ab6 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -101,12 +101,12 @@ struct timespec64 { /* cmpxchg - compare and exchange, single-threaded version */ #define cmpxchg(ptr, old, new) ({ \ - typeof(*(ptr)) __old = (old); \ - typeof(*(ptr)) __new = (new); \ - typeof(*(ptr)) __ret = *(ptr); \ - if (__ret == __old) \ - *(ptr) = __new; \ - __ret; \ + typeof(*(ptr)) __cmpxchg_old = (old); \ + typeof(*(ptr)) __cmpxchg_new = (new); \ + typeof(*(ptr)) __cmpxchg_ret = *(ptr); \ + if (__cmpxchg_ret == __cmpxchg_old) \ + *(ptr) = __cmpxchg_new; \ + __cmpxchg_ret; \ }) /* Reference count type */