[Concept,14/16] ext4l: Use existing linux/nospec.h for array_index_nospec

Message ID 20260119214846.3087611-15-sjg@u-boot.org
State New
Headers
Series ext4l: Move definitions to standard Linux headers |

Commit Message

Simon Glass Jan. 19, 2026, 9:48 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Remove the duplicate array_index_nospec definition and include the
existing linux/nospec.h header instead.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 fs/ext4l/ext4_uboot.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 484bd70222f..e617fc41e30 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -1334,8 +1334,8 @@  static inline unsigned long ext4_find_next_bit_le(const void *addr,
 
 /* folio_get - now implemented in support.c */
 
-/* array_index_nospec - bounds checking without speculation (no-op in U-Boot) */
-#define array_index_nospec(index, size) (index)
+/* array_index_nospec is in linux/nospec.h */
+#include <linux/nospec.h>
 
 /* atomic_inc_return and atomic_add_return are now in asm-generic/atomic.h */