From patchwork Thu Jan 8 18:51:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1347 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=1767898354; bh=Ua3tO4HBnk9RYHTMfulSoIt0JIxh8cMg0SNxuEA04MA=; 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=p5QH49YE3PngRmdUtM5i97G1m0s1ELb8BF1IaPjh5eSR90+h4HrwAeZRT3FbhBwg+ bSyzPU0U8a1h4EvgEmUSagh1E/v/OTVnrrNNCQWXTzxHT4wmjD7UAa1t5LBd9pDxUm wXVeSPfcU+Or37H3xpMJ2uLC0/wU/4hfQSeRWvbdIH1IODgX/J2j9QU7r98UgLZa7Q Bw93dbSNs0VpOtJWrdvfcmfbHhbjsYunBMc78GZA8sIvP+eTEwl695fUoYXWEyPRxv ndXeL54dcilHy5HT2adT40Otdfx80d5ZPE2PxO6CvZs1tmSszfS3SGvgrfiaITJmzp 8K4XpOvWG0uxg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 391FB691CC for ; Thu, 8 Jan 2026 11:52:34 -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 LEp2Lg9CRddT for ; Thu, 8 Jan 2026 11:52:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767898354; bh=Ua3tO4HBnk9RYHTMfulSoIt0JIxh8cMg0SNxuEA04MA=; 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=p5QH49YE3PngRmdUtM5i97G1m0s1ELb8BF1IaPjh5eSR90+h4HrwAeZRT3FbhBwg+ bSyzPU0U8a1h4EvgEmUSagh1E/v/OTVnrrNNCQWXTzxHT4wmjD7UAa1t5LBd9pDxUm wXVeSPfcU+Or37H3xpMJ2uLC0/wU/4hfQSeRWvbdIH1IODgX/J2j9QU7r98UgLZa7Q Bw93dbSNs0VpOtJWrdvfcmfbHhbjsYunBMc78GZA8sIvP+eTEwl695fUoYXWEyPRxv ndXeL54dcilHy5HT2adT40Otdfx80d5ZPE2PxO6CvZs1tmSszfS3SGvgrfiaITJmzp 8K4XpOvWG0uxg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 27828691C4 for ; Thu, 8 Jan 2026 11:52:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767898351; bh=AJJUVMDYNMVWXsiCivto/YAnLv3/59Bd73M3TX1xIu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LzcSSWqFYTxJ8jrzeZzw32cXMbw88m4l57KOtxVc4SJ71MoQDcFV7M8S8O4OQoKII aNzyXdlDO/lgv049iVerame378heh2lwfP9hZ5vPnWizocgjTAuaziNIkTyqVVGgu5 hUqQUouY8ZOAydhWcwesZ6STUwNYhX9dJj8oHVIhELrl8wBBXBFY5wlQMaiScIIr32 3M+vZZxNUVB9D3GKveflf8cXIFVQGfBWjhm409umBMFta9SypZ76VEHoa58XzZ05yz dILQyitp0jHCUvtp9h7C+0Oq2FuvgIawnrlhpUIyEyBcUByrZ3jKxRExAHrHLRN59v /Bqd4f5RRDY4w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DB04D691BF; Thu, 8 Jan 2026 11:52:31 -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 C9lSejAvyJ5c; Thu, 8 Jan 2026 11:52:31 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767898347; bh=0OW0vzzAwJTbBbklNNqkB42Igdh+tXKHK8+jiTKXNaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rqk5pDSXJMgz5a3LOuFRemquHNVyoh7h8Blj8s0XvU0X1wTkIBf46LHDT4CNMs1Iz 97hIqrmUauJKZ0ZR8lwj+cT/Eqo8uISGX65pjt3UElZAQL8Q/G/JhziGTznTRBOrOW RjpkJD8e9npfRGHhRmNARzv9fN0oMZHLc7ogEyzEQ8wGg1GVAo+AcxVEZ2jQshUUrk r/0CnDxKFvCjvHjDnzMtK9M7rNA77Kr1H4zCykYV09DcQ4MuGggLTyGX0mS78KhNv2 C7+xTdrhfpMOt07B/4UCT6/UowNXd17SfUHd2pCOoQePXFzR1nYsoscSiLVQ+FSrxg 4/G5nWhJBtZeA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 92FD169101; Thu, 8 Jan 2026 11:52:27 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 8 Jan 2026 11:51:21 -0700 Message-ID: <20260108185149.1995917-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260108185149.1995917-1-sjg@u-boot.org> References: <20260108185149.1995917-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: WXMY66T24YSWW63JBBRAY7B33CZVTJJ2 X-Message-ID-Hash: WXMY66T24YSWW63JBBRAY7B33CZVTJJ2 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 06/21] ext4l: sandbox: Use volatile in set_bit() etc. 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 Other archs use a volatile address so update sandbox to match. This will prevent warnings in common code. Update the ext4 stub functions too. Signed-off-by: Simon Glass --- arch/sandbox/include/asm/bitops.h | 6 +++--- fs/ext4l/stub.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/sandbox/include/asm/bitops.h b/arch/sandbox/include/asm/bitops.h index f27d5e98c56..2fdc0116da0 100644 --- a/arch/sandbox/include/asm/bitops.h +++ b/arch/sandbox/include/asm/bitops.h @@ -34,11 +34,11 @@ /* * Function prototypes to keep gcc -Wall happy. */ -extern void set_bit(int nr, void *addr); +extern void set_bit(int nr, volatile void *addr); -extern void clear_bit(int nr, void *addr); +extern void clear_bit(int nr, volatile void *addr); -extern void change_bit(int nr, void *addr); +extern void change_bit(int nr, volatile void *addr); static inline void __change_bit(int nr, void *addr) { diff --git a/fs/ext4l/stub.c b/fs/ext4l/stub.c index af0bb045d5f..2084faa3b50 100644 --- a/fs/ext4l/stub.c +++ b/fs/ext4l/stub.c @@ -79,21 +79,21 @@ typedef struct journal_s journal_t; * Bit operations - sandbox declares these extern but doesn't implement them. * These work on bitmaps where nr is the absolute bit number. */ -void set_bit(int nr, void *addr) +void set_bit(int nr, volatile void *addr) { unsigned long *p = (unsigned long *)addr + (nr / BITS_PER_LONG); *p |= (1UL << (nr % BITS_PER_LONG)); } -void clear_bit(int nr, void *addr) +void clear_bit(int nr, volatile void *addr) { unsigned long *p = (unsigned long *)addr + (nr / BITS_PER_LONG); *p &= ~(1UL << (nr % BITS_PER_LONG)); } -void change_bit(int nr, void *addr) +void change_bit(int nr, volatile void *addr) { unsigned long *p = (unsigned long *)addr + (nr / BITS_PER_LONG);