[Concept,26/34] ext4l: Move pgoff_t to linux/types.h

Message ID 20260114225635.3407989-27-sjg@u-boot.org
State New
Headers
Series ext4l: Clean up ext4_uboot.h by moving definitions to standard headers |

Commit Message

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

Move pgoff_t (page cache offset type) from ext4_uboot.h to linux/types.h
where it belongs alongside other fundamental Linux types like sector_t
and blkcnt_t.

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/types.h | 3 +++
 2 files changed, 4 insertions(+), 2 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 4cb9b23a8c7..08d28fd01ad 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -167,8 +167,7 @@  struct kobject {
 
 /* Forward declarations (struct inode, struct address_space) are in linux/fs.h */
 
-/* Page types */
-typedef unsigned long pgoff_t;
+/* pgoff_t is in linux/types.h */
 #ifndef PAGE_SHIFT
 #define PAGE_SHIFT	12
 #endif
diff --git a/include/linux/types.h b/include/linux/types.h
index 957284d37ab..5255eecd407 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -165,6 +165,9 @@  typedef s64	ktime_t;
 typedef u64 sector_t;
 typedef u64 blkcnt_t;
 
+/* Page cache offset type */
+typedef unsigned long pgoff_t;
+
 #ifdef __linux__
 struct ustat {
 	__kernel_daddr_t	f_tfree;