[Concept,19/33] ext4l: Move time_is_before_jiffies() to linux/jiffies.h

Message ID 20260121220857.2137568-20-sjg@u-boot.org
State New
Headers
Series Reorganise ext4l compatibility stubs |

Commit Message

Simon Glass Jan. 21, 2026, 10:08 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Move the time_is_before_jiffies() stub macro to linux/jiffies.h where
other jiffies-related definitions reside.

This reduces ext4_uboot.h from 468 to 465 lines.

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

 fs/ext4l/ext4_uboot.h   | 3 ---
 include/linux/jiffies.h | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 1228ced8e6c..9229fc7ffc3 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -448,9 +448,6 @@  struct disk_partition *ext4l_get_partition(void);
  * Stubs for resize.c
  */
 
-/* time_is_before_jiffies - check if time is before current jiffies */
-#define time_is_before_jiffies(a)	({ (void)(a); 0; })
-
 /* ext4_update_overhead - declaration for stub.c */
 int ext4_update_overhead(struct super_block *sb, bool force);
 
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 153a2841bf5..161ec56f688 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -29,4 +29,7 @@ 
 #define nsecs_to_jiffies(ns)	((ns) / (1000000000L / HZ))
 #define round_jiffies_up(j)	(j)
 
+/* Time comparison - stub for U-Boot (jiffies is always 0) */
+#define time_is_before_jiffies(a)	({ (void)(a); 0; })
+
 #endif /* _LINUX_JIFFIES_H */