[Concept,05/16] ext4l: Move _RET_IP_, _THIS_IP_, BITS_PER_BYTE to standard headers
Commit Message
From: Simon Glass <simon.glass@canonical.com>
Move _RET_IP_ and _THIS_IP_ instruction pointer macros to linux/kernel.h
where they belong. Remove the redundant BITS_PER_BYTE definition since
it is already provided by linux/bitops.h.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
fs/ext4l/ext4_uboot.h | 10 +++-------
include/linux/kernel.h | 9 +++++++++
2 files changed, 12 insertions(+), 7 deletions(-)
@@ -113,7 +113,7 @@
/* lockdep stubs - needed before jbd2.h is included */
#include <linux/lockdep.h>
-#define _THIS_IP_ ((unsigned long)0)
+/* _THIS_IP_ is in linux/kernel.h */
/* completion - use Linux header */
#include <linux/completion.h>
@@ -318,8 +318,7 @@ void iput(struct inode *inode);
/* current task - from linux/sched.h */
#include <linux/sched.h>
-/* _RET_IP_ - return instruction pointer */
-#define _RET_IP_ ((unsigned long)__builtin_return_address(0))
+/* _RET_IP_ is in linux/kernel.h */
/* SB_FREEZE_* constants are in linux/fs.h */
@@ -663,10 +662,7 @@ static inline unsigned long memweight(const void *ptr, size_t bytes)
return ret;
}
-/* BITS_PER_BYTE */
-#ifndef BITS_PER_BYTE
-#define BITS_PER_BYTE 8
-#endif
+/* BITS_PER_BYTE is in linux/bitops.h */
/* extents.c stubs */
@@ -321,4 +321,13 @@ enum system_states {
#define might_sleep() do { } while (0)
#define might_sleep_if(cond) do { } while (0)
+/*
+ * _RET_IP_ and _THIS_IP_ - instruction pointer macros
+ *
+ * _RET_IP_: return address of current function
+ * _THIS_IP_: current instruction pointer (stub - lockdep not used in U-Boot)
+ */
+#define _RET_IP_ ((unsigned long)__builtin_return_address(0))
+#define _THIS_IP_ ((unsigned long)0)
+
#endif