From patchwork Wed Jan 14 22:55:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1499 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=1768431437; bh=/GJzMwUbRxsvPWjExNCbN/DHWZpuQUZNyMAPtWVdR4k=; 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=czlVI+U4WIGI2gxBO38jr1mtqs3glvbPTfzr0CGcjQzIMfhKJ55gVgp6LSoi+Z1FO l8sebWSCNi/hjciBC+I5L0P2qzv/2f/neub8nElnib/e+/R+5EtCVzfjCSkBCXUnwy eoIhOPAkhaJSdUtOWb5qdpcAixQImQ88A3FHWcRAmSuIPCfqZGf5pMh2sP0VZkkH8t 4a5dKpa9HnZbFYQ89flExc9XIFyygqMmH1PqinOmpIZc7trz4MxJmkvZNtZ0oztmZX WnT/ZyH6T0LBV/m0W3dyvKivVECKffDX+4tNvKIPCrxhHKpXzaJa1irqM9UOkaTMlf e6Rl3jnCK9MaA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 188B46934D for ; Wed, 14 Jan 2026 15:57:17 -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 BX0UFBdkBC_q for ; Wed, 14 Jan 2026 15:57:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431437; bh=/GJzMwUbRxsvPWjExNCbN/DHWZpuQUZNyMAPtWVdR4k=; 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=czlVI+U4WIGI2gxBO38jr1mtqs3glvbPTfzr0CGcjQzIMfhKJ55gVgp6LSoi+Z1FO l8sebWSCNi/hjciBC+I5L0P2qzv/2f/neub8nElnib/e+/R+5EtCVzfjCSkBCXUnwy eoIhOPAkhaJSdUtOWb5qdpcAixQImQ88A3FHWcRAmSuIPCfqZGf5pMh2sP0VZkkH8t 4a5dKpa9HnZbFYQ89flExc9XIFyygqMmH1PqinOmpIZc7trz4MxJmkvZNtZ0oztmZX WnT/ZyH6T0LBV/m0W3dyvKivVECKffDX+4tNvKIPCrxhHKpXzaJa1irqM9UOkaTMlf e6Rl3jnCK9MaA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0808D69342 for ; Wed, 14 Jan 2026 15:57:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431435; bh=EwTg7F0B86PSFrQ1nRwx8Yoloyo5TRfNlhqj+82d/qA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UL/6jdanfUeCEv11s8VBSxYzQ1CnlSaZLJGI8aGhVUKfcxQWPSR7XB9I37KNrOCzf dKjpy5j8qYKrSY/iwM4IZA0Snh8CYzpL5Zmsyny0eMm/+Do+mFnWZaVE5HiqlAg0vX uQatKsAoIekY1oATK1qnnmxwYicPToAofCIpMdBsQVyaMqNjQ1sjOrtrPs6RapLemb PhnQ2OmxOKGw9E/x2ELXNPd6cZGuqlve5kvbZB1thbH7jV7ZHjRxzBZ2J1Xv/KcSZ/ 42LgqKgeNI3xxrT7qUksVdZiyba20pdO87UfXlrdUekC3OEwtEKlpM5dcW9APJuaLV so6tGsLfGEuhg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0E322692F1; Wed, 14 Jan 2026 15:57:15 -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 6Pg5uUTHqaur; Wed, 14 Jan 2026 15:57:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431431; bh=lGfoRWR6bfVjWbDS02qHpFnU1kJ87xsfaEnBQj99A2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eLk+f8Z1bBXTte/V266c/tLqnt7RYHgiKffIH8hZDS/wLXBpW4w2OEOl/36ch3V7C Ka4qjpsZ535Yf45BKUtE32yOD4HJ/MY6LUXx1QWNKqdbacPF0Lu0aO8eKKj9bxhBID IBTsv4DzRpw5ixFJ5FJ3U9aO1uybNd1K9azYebreDz/s/+rVZhM15UX7FfyYj55Z/N q8xOD35/UTQLyvXSux67oR7l4aVOSEWIlnPjbIr3+SaddCE39DOSClpVIalbjchpIC NQ5QX4OhP2mw1GruWZtPXEAKYe+TxoBkPOn751CxmOrtTGPyWowr0iigjIKmwC3bCa ISClsPOOZ/Y/g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id B5CC4692EF; Wed, 14 Jan 2026 15:57:10 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 14 Jan 2026 15:55:55 -0700 Message-ID: <20260114225635.3407989-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260114225635.3407989-1-sjg@u-boot.org> References: <20260114225635.3407989-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TXPQJZ5UQ5CMY2V5HXXZ74X634VZ6ODI X-Message-ID-Hash: TXPQJZ5UQ5CMY2V5HXXZ74X634VZ6ODI 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 , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 05/34] ext4l: Remove duplicate macro definitions 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 Remove several duplicate macros from ext4_uboot.h: - rcu_read_lock, rcu_read_unlock, synchronize_rcu, rcu_assign_pointer, rcu_dereference - were defined in both RCU stubs section and later in RCU list operations section - filemap_invalidate_lock_shared, filemap_invalidate_unlock_shared - sb_end_intwrite Keep the first occurrences and add comments to reference them where duplicates are removed. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 5a55984ec75..8a160a2db19 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -434,6 +434,7 @@ int __ext4_xattr_set_credits(struct super_block *sb, struct inode *inode, #define rcu_dereference_protected(p, c) (p) #define rcu_assign_pointer(p, v) ((p) = (v)) #define call_rcu(head, func) do { func(head); } while (0) +#define synchronize_rcu() do { } while (0) /* RCU head for callbacks - defined in linux/compat.h as callback_head */ @@ -1519,8 +1520,7 @@ static inline char *d_path(const struct path *path, char *buf, int buflen) #define filemap_write_and_wait(m) ({ (void)(m); 0; }) #define filemap_dirty_folio(m, f) ({ (void)(m); (void)(f); false; }) #define filemap_lock_folio(m, i) ((struct folio *)NULL) -#define filemap_invalidate_lock_shared(m) do { } while (0) -#define filemap_invalidate_unlock_shared(m) do { } while (0) +/* filemap_invalidate_lock_shared defined earlier */ #define mapping_tagged(m, t) (0) #define tag_pages_for_writeback(m, s, e) do { } while (0) #define try_to_writeback_inodes_sb(sb, r) do { } while (0) @@ -2480,8 +2480,7 @@ static inline unsigned long ext4_find_next_bit_le(const void *addr, #undef folio_address #define folio_address(folio) ((folio)->data) -/* sb_end_intwrite stub */ -#define sb_end_intwrite(sb) do { (void)(sb); } while (0) +/* sb_end_intwrite defined earlier */ /* WARN_RATELIMIT - just evaluate condition, no warning in U-Boot */ #define WARN_RATELIMIT(condition, ...) (condition) @@ -2533,11 +2532,7 @@ struct seq_operations { #define list_del_rcu(entry) list_del(entry) #define list_add_rcu(new, head) list_add(new, head) #define list_add_tail_rcu(new, head) list_add_tail(new, head) -#define rcu_read_lock() do { } while (0) -#define rcu_read_unlock() do { } while (0) -#define synchronize_rcu() do { } while (0) -#define rcu_assign_pointer(p, v) ((p) = (v)) -#define rcu_dereference(p) (p) +/* Other RCU stubs are defined earlier in this file */ /* raw_cpu_ptr - get pointer to per-CPU data for current CPU */ #define raw_cpu_ptr(ptr) (ptr)