[Concept,11/34] ext4l: Remove dead iomap definitions

Message ID 20260114225635.3407989-12-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>

Remove the iomap type constants and struct definitions that are
wrapped in a LINUX_IOMAP_H header guard. Since linux/iomap.h is already
included at the top of ext4_uboot.h, this block was dead code that
could never be compiled.

The definitions also had different values from linux/iomap.h (e.g.
IOMAP_MAPPED was 0 vs 2), which could have caused subtle bugs if the
guard was ever removed.

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

 fs/ext4l/ext4_uboot.h | 30 +-----------------------------
 1 file changed, 1 insertion(+), 29 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 0edcb4533b7..ef40658753b 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -211,35 +211,7 @@  struct dir_context {
 	loff_t pos;
 };
 
-/* iomap types - only define if linux/iomap.h not included */
-#ifndef LINUX_IOMAP_H
-#define IOMAP_MAPPED	0
-#define IOMAP_INLINE	1
-#define IOMAP_UNWRITTEN	2
-#define IOMAP_DELALLOC	3
-#define IOMAP_HOLE	4
-
-struct iomap {
-	u64 addr;
-	loff_t offset;
-	loff_t length;
-	u16 type;
-	u16 flags;
-	struct block_device *bdev;
-	void *inline_data;
-};
-
-struct iomap_ops {
-	int (*iomap_begin)(struct inode *inode, loff_t pos, loff_t length,
-			   unsigned flags, struct iomap *iomap, struct iomap *srcmap);
-	int (*iomap_end)(struct inode *inode, loff_t pos, loff_t length,
-			 ssize_t written, unsigned flags, struct iomap *iomap);
-};
-
-/* iomap DIO flags */
-#define IOMAP_DIO_UNWRITTEN	(1 << 0)
-#define IOMAP_DIO_FORCE_WAIT	(1 << 1)
-#endif /* LINUX_IOMAP_H */
+/* iomap types and structs are in linux/iomap.h */
 
 /* fiemap types */
 #define FIEMAP_FLAG_SYNC	0x00000001