From patchwork Wed Jan 21 22:08:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1729 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033362; bh=jIGPd97COxZ70/6NgZx0xxIp4o8P2Yk44dodU/5gcH0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gPu+YomU5ruwR1TowKxKrvgH/PuqIT6qsMHqhbZW3Yj2KUxFRvApGTBkuDCuO6XDC R61KoXust1gSPbRXniQg3TcHYelc40I6lDhd7N6y9/gdUxlKHz1pgpwGhruEH3iqD6 qQzvyZSG5+eRfbOxchywFsTNZcxCek1AgIkW6LJvWyyjS9BCj4chEksenZUKjjZT7U Bf+NqmmigKe32dN6h/d9eg+JigDWtzUJ7LTSh5NiAyRdw0us7quV6SOWHGDV0UlAN+ 6JGptukzSM/wP+lANqxa0+r4+l+X0+q6RrayFVwpJYY9f3BwIv0xNXl01mwU4K2nFj Y6BrX02Jvgjmg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 94099695F2 for ; Wed, 21 Jan 2026 15:09:22 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ggBnibFl7CQV for ; Wed, 21 Jan 2026 15:09:22 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033361; bh=jIGPd97COxZ70/6NgZx0xxIp4o8P2Yk44dodU/5gcH0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=IFiIzPFh+asGdqO/sGvH/R9eOAqgna5oKq59cp9qg9Dnvt0iWsYELvNCKzJuus5ty VJ0Bds8DNG5a/AKXi1/f6wPCET521ouojzalCXRJ+USLqSN66p4A3VkBNJXzBoKrUh YhDBE3PPiqxyPPQ2mEvgBDxRDnVRB+yL0szBVmqC7R6XM85vhtHb8VLeSlzFVVmmyh I9Yv8jdkaFCCupPTBu8Wf1CP65L3AzqEhdp6/t+27FaKXHmYHEy3lvOM7vfSIF7hZe c5u50mUo2HhFM+f6zTQaXIkScl9LnLTuM/LhXv+fQ0By2BkxbqS0I5uRsJX/F4bwzz /kKBTNTFAN7rQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 02418695FD for ; Wed, 21 Jan 2026 15:09:21 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033358; bh=rkdHABar2A2vrj5ax3eSaOnMO/JVKnCR55lQlJQOe0I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UXVD+gmqvvzreL1CzBItiukzpGM8+P0+ODu5FSrNYQqwPv3G0ZsUjjCANWiqg9EQa 1g2g1zJccOjkFi14HEjq7D7q2QewskVu1IGbO6Za+o6gq5qx6qZSil14jeckZqvUqr oMmj9Qzyx0JbXm//LygTCwz6TiN4WiTFJsQ0ecbCgNC8oZYiZ0kuSMW4Ni/8u3YIqi EFTD5dzKNbFQtIwliI/KSHpqc/sc5gQeoQBvhqsqVBFnVmJrL2kU5TSkjjiGhSQN1f Fd44VoEXb5JmGp5xTxfiHJTvCfJWwOQvA87pDNZYd4XzdQNwljQ904am5wqtHcuA95 9B1qOh6G6SF3g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9A48C695F2; Wed, 21 Jan 2026 15:09:18 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id q4O46I5b9-YX; Wed, 21 Jan 2026 15:09:18 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033357; bh=qn9ninMfsEd8XYVIwUXZstjFnsPwfWO4vBwOGco6co4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rvgWD1e6dLgZog1m9vJ0ykExu5nIYRhGKdGMqrf0YANQYkCSb+9PnFyP/83NtUUw7 QjJnLur7BeXLDB9Z/PU7fsupNCyVScWTiWM+0l0giGZauoQ0G02tbHXOBRF7LB+REz UToiPkMkxWIm3a6wiZPWpMRFFovkrXvKFT3m5f4Qm6xa5MCucHYiyY9BXdOMMASeyP VCdEL7x3kiGRXZbpf1XIm9bBq4HeDcZRWxP2TNMyxoCrY1/J4A2OV1uKaYPJyZwBYw qgNAGqS/vaIsxL23mJV1M3MzGIaZklsJj10xsfaIj6Qx43v2kUwC1dW1jMuFvE7biS tYng0nl7zkhQA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id C79E8695FD; Wed, 21 Jan 2026 15:09:16 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 21 Jan 2026 15:08:16 -0700 Message-ID: <20260121220857.2137568-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260121220857.2137568-1-sjg@u-boot.org> References: <20260121220857.2137568-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 6MTFGKP2Q2LUX4XL2IINFTXKVWW2W7VE X-Message-ID-Hash: 6MTFGKP2Q2LUX4XL2IINFTXKVWW2W7VE X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 03/33] ext4l: Remove redundant header-location comments from ext4_uboot.h List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Remove comment lines that simply document which header provides a definition, as these add noise without value. The definitions are already in the appropriate headers, so the comments are redundant. This removes approximately 250 standalone comments of the form "/* X is in linux/Y.h */" and consolidates related #include statements. Co-developed-by: Claude (Anthropic) Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 528 +----------------------------------------- 1 file changed, 9 insertions(+), 519 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 2f73325e521..5d62c49663c 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -70,16 +70,6 @@ #undef no_printk #define no_printk(fmt, ...) ({ 0; }) -/* rol32 and ror32 are now in linux/bitops.h */ -/* Time types - timespec64 and time64_t are now in linux/time.h */ - -/* - * ktime_t, sector_t are now in linux/types.h - * atomic_t, atomic64_t are now in asm-generic/atomic.h - * MAX_JIFFY_OFFSET is now in linux/jiffies.h - * BDEVNAME_SIZE is now in linux/blkdev.h - * blk_opf_t is now in linux/blk_types.h - */ #include #include #include @@ -90,88 +80,27 @@ #include #include #include - -/* atomic_dec_if_positive, atomic_add_unless, etc. are now in asm-generic/atomic.h */ -/* cmpxchg is now in asm-generic/atomic.h */ -/* SMP stubs (raw_smp_processor_id, smp_*mb) are now in linux/smp.h */ -/* refcount_t and operations are now in linux/refcount.h */ - -/* rwlock_t and read_lock/read_unlock are now in linux/spinlock.h */ #include - -/* RB tree types - from included above */ - -/* percpu - use Linux headers */ #include #include - -/* Project ID type - use linux/projid.h */ #include - -/* kobject is now in linux/kobject.h */ #include - -/* lockdep stubs - needed before jbd2.h is included */ #include -/* _THIS_IP_ is in linux/kernel.h */ - -/* completion - use Linux header */ #include - -/* Cache alignment - use linux/cache.h */ #include - -/* ZERO_OR_NULL_PTR is in linux/slab.h */ -/* data_race is in linux/compiler.h */ - -/* REQ_META, REQ_PRIO, REQ_RAHEAD are in linux/blk_types.h */ -/* __GFP_MOVABLE, __GFP_FS are in linux/slab.h */ - -/* Capabilities - use linux/capability.h */ #include - -/* FIEMAP types - use linux/fiemap.h */ #include -#define EXT4_FIEMAP_EXTENT_HOLE 0x08000000 - -/* FALLOC_FL_* flags are in linux/fs.h */ +#include +#include -/* File flags */ +#define EXT4_FIEMAP_EXTENT_HOLE 0x08000000 #define O_SYNC 0 +#define S_NOQUOTA 0 -/* Forward declarations (struct inode, struct address_space) are in linux/fs.h */ - -/* pgoff_t is in linux/types.h */ #ifndef PAGE_SHIFT #define PAGE_SHIFT 12 #endif -/* FMODE_32BITHASH, FMODE_64BITHASH are in linux/fs.h */ - -/* struct file is defined in linux/fs.h */ - -/* kiocb, iov_iter - use linux/uio.h */ -#include - -/* __counted_by is in linux/compiler_attributes.h */ - -/* dir_context, filldir_t are in linux/fs.h */ - -/* iomap types and structs are in linux/iomap.h */ - -/* fscrypt_str, qstr are now in ext4_fscrypt.h */ - -/* percpu rw semaphore is in linux/percpu.h */ - -/* Memory allocation context - use linux/sched/mm.h */ -#include - -/* IS_CASEFOLDED is in linux/fs.h */ -/* IS_ENCRYPTED and FSCRYPT_SET_CONTEXT_MAX_SIZE are in ext4_fscrypt.h */ -#define S_NOQUOTA 0 - -/* user_namespace and init_user_ns are in linux/cred.h */ - /* * BUG_ON / BUG - stubs (not using linux/bug.h which panics) * In Linux, these indicate kernel bugs. In ext4l, some BUG_ON conditions @@ -183,57 +112,15 @@ #define BUG_ON(cond) do { (void)(cond); } while (0) #define BUG() do { } while (0) -/* might_sleep is in linux/kernel.h */ - -/* sb_rdonly is in linux/super.h */ - -/* Trace stubs are now in ext4_trace.h */ - -/* Buffer operations are in linux/buffer_head.h */ -/* wait_on_bit_io is now in linux/wait_bit.h */ - -/* inode_needs_sync is in linux/fs.h */ - -/* Memory barriers are now in linux/smp.h */ - -/* - * set_bit/clear_bit are declared extern in asm/bitops.h but not implemented. - * We implement them in interface.c for sandbox. - */ - -/* Little-endian bit operations - use asm-generic/bitops/le.h */ #include - -/* KUNIT stub - use kunit/static_stub.h */ #include - -/* percpu_counter operations are in linux/percpu_counter.h */ - -/* in_group_p is in linux/cred.h */ - -/* Quota operations - use linux/quotaops.h */ #include - -/* icount_read is in linux/fs.h */ -/* d_inode is now in linux/dcache.h */ - -/* Random number functions - use linux/random.h */ #include -/* Buffer cache operations - sb_find_get_block, sync_dirty_buffer are in linux/buffer_head.h */ - -/* Time functions - ktime_get_real_seconds, time_before32 are in linux/time.h */ - /* Inode operations - iget_locked and new_inode are in interface.c */ extern struct inode *new_inode(struct super_block *sb); -/* i_uid_write, i_gid_write, inode_fsuid_set, inode_init_owner are in linux/fs.h */ -/* insert_inode_locked, unlock_new_inode, clear_nlink are in linux/fs.h */ -/* IS_DIRSYNC is in linux/fs.h */ - -/* fscrypt_prepare_new_inode, fscrypt_set_context are in ext4_fscrypt.h */ -/* ext4_init_acl is provided by acl.h */ -/* xattr stubs for files that don't include xattr.h */ +/* Forward declarations for xattr functions */ struct super_block; struct buffer_head; struct qstr; @@ -243,59 +130,17 @@ int __ext4_xattr_set_credits(struct super_block *sb, struct inode *inode, struct buffer_head *block_bh, size_t value_len, bool is_create); #endif -/* ext4_init_security is provided by xattr.h */ - -/* is_bad_inode is in linux/fs.h */ /* Block device operations - stubs */ #define sb_issue_zeroout(sb, blk, num, gfp) ({ (void)(sb); (void)(blk); (void)(num); (void)(gfp); 0; }) #define blkdev_issue_flush(bdev) ({ (void)(bdev); 0; }) -/* inode_is_locked, i_size_write, i_size_read are in linux/fs.h */ - -/* spin_trylock is defined in linux/spinlock.h */ - -/* atomic_add_unless is now in asm-generic/atomic.h */ - -/* bgl_lock_ptr is now in linux/blockgroup_lock.h */ - -/* RCU stubs - use linux/rcupdate.h */ #include - -/* RCU head for callbacks - defined in linux/compat.h as callback_head */ - -/* lockdep_is_held is in linux/lockdep.h */ - -/* Memory allocation - use linux/slab.h which is already available */ #include -/* KMEM_CACHE macro is in linux/slab.h */ - -/* - * RB tree operations - use real rbtree implementation from lib/rbtree.c - * and include/linux/rbtree.h. rb_entry, rb_first, rb_next, rb_prev, - * rb_insert_color, rb_erase, rb_link_node, RB_EMPTY_ROOT, and - * rbtree_postorder_for_each_entry_safe are all provided by the real - * implementation - do not stub them! - */ - -/* inode/dentry operations */ void iput(struct inode *inode); -/* current task - from linux/sched.h */ #include - -/* _RET_IP_ is in linux/kernel.h */ - -/* SB_FREEZE_* constants are in linux/fs.h */ - -/* sb_writers is in linux/super.h */ - -/* mapping_large_folio_support is in linux/pagemap.h */ - -/* sector_t is now in linux/types.h */ - -/* Buffer head - from linux/buffer_head.h */ #include #include @@ -315,29 +160,14 @@ BUFFER_FNS(OwnsData, ownsdata) #define BH_Cached (BH_JBDPrivateStart + 2) BUFFER_FNS(Cached, cached) -/* get_block_t is in linux/fs.h */ - -/* crc32c - from linux/crc32c.h */ #include - -/* ratelimit_state - use linux/ratelimit.h */ #include - -/* fscrypt_dummy_policy and qstr are now in ext4_fscrypt.h */ - -/* errseq_t is defined in linux/fs.h */ -/* time64_t is now in linux/time.h */ - -/* IS_NOQUOTA is in linux/fs.h */ -/* dentry, name_snapshot are now in linux/dcache.h */ - -/* VM types - use linux/mm_types.h */ #include +#include +#include -/* pipe_inode_info - forward declaration */ +/* Forward declarations */ struct pipe_inode_info; - -/* Forward declarations for function prototypes (vm_fault is in linux/mm_types.h) */ struct kstat; struct path; struct file_kattr; @@ -346,67 +176,20 @@ struct readahead_control; struct fiemap_extent_info; struct folio; -/* qsize_t is in linux/quotaops.h */ - -/* blk_opf_t is in linux/blk_types.h */ - -/* bh_end_io_t and struct buffer_head are in linux/buffer_head.h */ - -/* DT_* directory entry types are in linux/fs.h */ - -/* mnt_idmap - use linux/mnt_idmapping.h */ -#include - -/* fstrim_range is in linux/fs.h */ - -/* rw_semaphore - defined in linux/rwsem.h, include it */ -#include - -/* block_device is defined in linux/fs.h */ - -/* SB_RDONLY, SB_I_VERSION, etc. superblock flags are in linux/fs.h */ - -/* uuid_t is now in linux/uuid.h */ - -/* super_block is now in linux/super.h */ - -/* Block device read-only check */ static inline int bdev_read_only(struct block_device *bdev) { return bdev ? bdev->read_only : 0; } -/* kuid_t and kgid_t - from linux/cred.h */ #include -/* Inode state bits (I_NEW, I_FREEING, etc.) are in linux/fs.h */ -/* S_SYNC, S_NOATIME, etc. inode flags are in linux/fs.h */ -/* S_IRWXUGO is in linux/fs.h */ - -/* Whiteout mode for overlayfs */ #define WHITEOUT_DEV 0 #define WHITEOUT_MODE 0 -/* RENAME_* flags are in linux/fs.h */ -/* I_DIRTY_TIME is in linux/fs.h */ - -/* SB_LAZYTIME is in linux/fs.h */ -/* ATTR_* iattr valid flags are in linux/fs.h */ -/* STATX_* flags and struct kstat are in linux/stat.h */ -/* VM fault return values are in linux/mm_types.h */ -/* struct path is defined in linux/fs.h */ -/* VM structs (vm_area_struct, page, vm_fault, vm_operations_struct) are in linux/mm_types.h */ - -/* Forward declaration for swap */ struct swap_info_struct; - -/* PF_MEMALLOC is in linux/sched.h */ - -/* Forward declarations for inode operations */ struct inode_operations; struct file_operations; -/* inode - extended for inode.c */ struct inode { struct super_block *i_sb; unsigned long i_ino; @@ -573,12 +356,6 @@ struct dx_hash_info { #define EXT4_HTREE_EOF_32BIT ((1UL << (32 - 1)) - 1) #define EXT4_HTREE_EOF_64BIT ((1ULL << (64 - 1)) - 1) -/* jbd2_buffer_trigger_type is defined in jbd2.h */ -/* struct seq_file is in linux/seq_file.h */ - -/* fscrypt_has_encryption_key, fscrypt_fname_siphash are in ext4_fscrypt.h */ - -/* ext4 warning macros - stubs (only when ext4.h is not included) */ #ifdef EXT4_UBOOT_NO_EXT4_H #define ext4_warning(sb, fmt, ...) \ do { } while (0) @@ -587,31 +364,6 @@ struct dx_hash_info { do { } while (0) #endif -/* fallthrough is in linux/compiler_attributes.h */ - -/* BUILD_BUG_ON is in linux/build_bug.h */ -/* WARN_ON, WARN_ON_ONCE, WARN_ONCE are in linux/bug.h */ -/* pr_warn_once is in linux/printk.h */ - -/* lockdep_assert_held_read is in linux/lockdep.h */ -/* strtomem_pad is in linux/string.h */ -/* strscpy_pad is in linux/string.h */ - -/* memweight is in linux/string.h */ - -/* BITS_PER_BYTE is in linux/bitops.h */ - -/* extents.c stubs */ - -/* rwsem_is_locked is in linux/rwsem.h */ - -/* Buffer operations - sb_getblk_gfp, bh_uptodate_or_lock are in linux/buffer_head.h */ -/* ext4_read_bh is stubbed in interface.c */ - -/* Inode locking stubs are in linux/fs.h */ -/* Lock debugging stubs are in linux/lockdep.h */ - -/* File operations */ #define file_modified(file) ({ (void)(file); 0; }) #define file_accessed(file) do { (void)(file); } while (0) @@ -623,27 +375,13 @@ struct dx_hash_info { #define generic_atomic_write_valid(iocb, from) ({ (void)(iocb); (void)(from); 0; }) #define vfs_setpos(file, offset, maxsize) ({ (void)(file); (void)(maxsize); (offset); }) -/* IS_NOSEC is in linux/fs.h */ - -/* Filemap operations and fault handlers are in linux/pagemap.h */ - -/* DAX device mapping check - always false in U-Boot */ #define daxdev_mapping_supported(f, i, d) ({ (void)(f); (void)(i); (void)(d); 1; }) -/* Inode time/size operations - inode_newsize_ok, i_blocksize, IS_SYNC are in linux/fs.h */ -/* inode_set_ctime_current, inode_set_mtime_to_ts are in linux/fs.h */ - -/* Case-folding stubs - not supported in U-Boot */ #define sb_no_casefold_compat_fallback(sb) ({ (void)(sb); 1; }) #define generic_ci_validate_strict_name(d, n) ({ (void)(d); (void)(n); 1; }) -/* in_range - use linux/minmax.h */ #include -/* dquot_reclaim_block is in linux/quotaops.h */ - -/* fiemap stubs are now in linux/fiemap.h */ - /* Memory retry wait */ #define memalloc_retry_wait(g) do { } while (0) @@ -652,10 +390,6 @@ struct dx_hash_info { /* indirect.c stubs */ -/* umin is in linux/minmax.h */ - -/* truncate_inode_pages is in linux/pagemap.h */ - /* ext4_sb_bread_nofail is stubbed in interface.c */ /* extents_status.c stubs */ @@ -669,14 +403,6 @@ struct dx_hash_info { /* hrtimer - use linux/hrtimer.h */ #include -/* write_trylock is in linux/spinlock.h */ - -/* percpu_counter_init/destroy are in linux/percpu_counter.h */ - -/* ratelimit macros are now in linux/ratelimit.h */ - -/* SEQ_START_TOKEN is in linux/seq_file.h */ - /* folio and pagemap - use linux/pagemap.h */ #include #include @@ -684,13 +410,6 @@ struct dx_hash_info { /* wbc_to_tag, WB_REASON_* - use linux/writeback.h */ #include -/* blk_plug is now in linux/blkdev.h */ - -/* address_space_operations is in linux/fs.h */ -/* buffer_migrate_folio, buffer_migrate_folio_norefs, noop_dirty_folio are in linux/buffer_head.h */ -/* readahead_control, FGP_*, kmap/kunmap, folio stubs are in linux/pagemap.h */ -/* __filemap_get_folio, folio_put, folio_get, mapping_clear_folio_cache are in linux/pagemap.h */ - /* projid_t is now in linux/projid.h */ /* @@ -730,32 +449,8 @@ struct dx_hash_info { /* d_path, path_put - use linux/path.h */ #include -/* fscrypt_file_open is in ext4_fscrypt.h */ -/* fsverity_file_open is in linux/fsverity.h */ #include -/* dquot_file_open is in linux/quotaops.h */ - -/* inode_io_list_del is in linux/writeback.h */ -/* inode_is_open_for_write, inode_is_dirtytime_only are in linux/fs.h */ - -/* Folio operations and writeback stubs are in linux/pagemap.h */ -/* folio_batch_release is in linux/pagevec.h */ - -/* Quota stubs are in linux/quotaops.h */ - -/* percpu_counter_sub is in linux/percpu_counter.h */ - -/* Filemap operations are in linux/pagemap.h */ -/* try_to_writeback_inodes_sb is in linux/writeback.h */ - -/* Buffer/block folio operations are in linux/buffer_head.h */ -/* write_begin_get_folio is in linux/pagemap.h */ - -/* fscrypt_name, fscrypt_match_name, and fscrypt stubs are in ext4_fscrypt.h */ - -/* fsverity stubs are in linux/fsverity.h */ - /* Inode time setters - needed for ext4.h */ static inline struct timespec64 inode_set_atime_to_ts(struct inode *inode, struct timespec64 ts) @@ -773,7 +468,6 @@ static inline struct timespec64 inode_set_ctime_to_ts(struct inode *inode, /* Inode version operations - use linux/iversion.h */ #include -/* inode_set_flags is in linux/fs.h */ /* Inode credential helpers - i_uid_read, i_gid_read need struct inode */ static inline unsigned int i_uid_read(const struct inode *inode) @@ -786,8 +480,6 @@ static inline unsigned int i_gid_read(const struct inode *inode) return inode->i_gid.val; } -/* i_uid_needs_update, i_gid_needs_update, i_uid_update, i_gid_update are in linux/fs.h */ - /* Device encoding helpers are now in linux/kdev_t.h */ #include @@ -796,9 +488,6 @@ static inline unsigned int i_gid_read(const struct inode *inode) /* Inode allocation/state operations */ extern struct inode *iget_locked(struct super_block *sb, unsigned long ino); -/* set_nlink, inc_nlink, drop_nlink are in linux/fs.h */ -/* inode_set_cached_link, init_special_inode, make_bad_inode are in linux/fs.h */ -/* iget_failed, find_inode_by_ino_rcu, mark_inode_dirty are in linux/fs.h */ /* Attribute operations */ #define setattr_prepare(m, d, a) ({ (void)(m); (void)(d); (void)(a); 0; }) @@ -807,8 +496,6 @@ extern struct inode *iget_locked(struct super_block *sb, unsigned long ino); #define generic_fillattr(m, req, i, s) do { } while (0) #define generic_fill_statx_atomic_writes(s, u_m, u_M, g) do { } while (0) -/* IS_APPEND, IS_IMMUTABLE are in linux/fs.h */ - /* File operations */ #define file_update_time(f) do { } while (0) #define vmf_fs_error(e) ((vm_fault_t)VM_FAULT_SIGBUS) @@ -820,8 +507,6 @@ extern struct inode *iget_locked(struct super_block *sb, unsigned long ino); /* Block device alignment */ #define bdev_dma_alignment(bd) (0) -/* Truncation stubs are in linux/pagemap.h */ - /* * Additional stubs for dir.c */ @@ -829,14 +514,6 @@ extern struct inode *iget_locked(struct super_block *sb, unsigned long ino); /* FSTR_INIT - fscrypt_str initializer (fscrypt_str defined in ext4_fscrypt.h) */ #define FSTR_INIT(n, l) { .name = (n), .len = (l) } -/* fscrypt directory operations are in ext4_fscrypt.h */ - -/* Readahead operations are in linux/pagemap.h */ - -/* Inode version operations are in linux/iversion.h */ - -/* dir_emit, dir_relax_shared are in linux/fs.h */ - /* File llseek */ #define generic_file_llseek_size(f, o, w, m, e) ({ (void)(f); (void)(o); (void)(w); (void)(m); (void)(e); 0LL; }) @@ -916,19 +593,10 @@ static inline const char *simple_get_link(struct dentry *dentry, return inode->i_link; } -/* fscrypt symlink stubs are in ext4_fscrypt.h */ - /* * Additional stubs for super.c */ -/* QFMT_VFS_* quota format constants are in linux/quotaops.h */ - -/* end_buffer_read_sync is in linux/buffer_head.h */ - -/* REQ_OP_READ is in linux/blk_types.h */ -/* SB_ACTIVE is in linux/fs.h */ - /* Part stat - not used in U-Boot. Note: sectors[X] is passed as second arg */ #define STAT_WRITE 0 #define STAT_READ 0 @@ -936,8 +604,6 @@ static u64 __attribute__((unused)) __ext4_sectors[2]; #define sectors __ext4_sectors #define part_stat_read(p, f) ({ (void)(p); (void)(f); 0ULL; }) -/* system_state, SYSTEM_HALT, etc. are in linux/kernel.h */ - /* * Hex dump - DUMP_PREFIX_* types are in hexdump.h. * However, the Linux kernel print_hex_dump has a different signature @@ -947,25 +613,12 @@ static u64 __attribute__((unused)) __ext4_sectors[2]; #undef print_hex_dump #define print_hex_dump(l, p, pt, rg, gc, b, len, a) do { } while (0) -/* SLAB_RECLAIM_ACCOUNT, SLAB_ACCOUNT are in linux/slab.h */ - /* Forward declarations for super_operations and export_operations */ struct kstatfs; struct fid; -/* super_operations is in linux/fs/super_types.h */ - -/* export_operations and fid - use linux/exportfs.h */ #include - -/* uuid_to_fsid is in linux/statfs.h */ - -/* kstatfs - use linux/statfs.h */ #include - -/* struct seq_file is in linux/seq_file.h */ - -/* Module stubs and register_filesystem are in linux/module.h */ #include /* EXT4_GOING flags */ @@ -978,29 +631,17 @@ int ext4_fill_super(struct super_block *sb, struct fs_context *fc); int ext4_commit_super(struct super_block *sb); void ext4_unregister_li_request(struct super_block *sb); -/* prandom - get_random_u32, prandom_u32_max are in linux/random.h */ - -/* ctype */ #include -/* crc16 - use U-Boot's implementation */ #include - -/* Timer and timing stubs are in linux/jiffies.h */ - -/* Path lookup flags - use linux/namei.h */ #include /* I/O priority classes - use linux/ioprio.h */ #include -/* SB_INLINECRYPT, SB_SILENT, SB_POSIXACL are in linux/fs.h */ #define SB_I_CGROUPWB 0 /* Not supported in U-Boot */ #define SB_I_ALLOW_HSM 0 /* Not supported in U-Boot */ -/* BLK_OPEN_* flags are in linux/blkdev.h */ -/* REQ_OP_*, REQ_SYNC, REQ_FUA are in linux/blk_types.h */ - /* blk_holder_ops for block device */ struct blk_holder_ops { void (*mark_dead)(struct block_device *, bool); @@ -1016,17 +657,11 @@ void end_buffer_write_sync(struct buffer_head *bh, int uptodate); /* Block size */ #define BLOCK_SIZE 1024 -/* NSEC_PER_SEC is in linux/time.h */ - -/* EXT4 magic number */ #define EXT4_SUPER_MAGIC 0xEF53 -/* MAX_LFS_FILESIZE is in linux/fs.h */ - /* blockgroup_lock - use linux/blockgroup_lock.h */ #include -/* submit_bh is in linux/buffer_head.h */ /* Buffer submission stubs - declarations for stub.c implementations */ struct buffer_head *bdev_getblk(struct block_device *bdev, sector_t block, unsigned int size, gfp_t gfp); @@ -1044,8 +679,6 @@ void fsnotify_sb_error(struct super_block *sb, struct inode *inode, int error); char *file_path(struct file *file, char *buf, int buflen); struct block_device *file_bdev(struct file *file); -/* percpu_init_rwsem/percpu_free_rwsem are in linux/percpu.h */ - /* Block device sync - declarations for stub.c */ int sync_blockdev(struct block_device *bdev); void invalidate_bdev(struct block_device *bdev); @@ -1056,40 +689,14 @@ void invalidate_bdev(struct block_device *bdev); /* DAX - declaration for stub.c */ void fs_put_dax(void *dax, void *holder); -/* fscrypt declarations are in ext4_fscrypt.h */ - -/* alloc_inode_sb, inode_generic_drop are in linux/fs.h */ -/* inode_set_iversion is in linux/iversion.h */ - -/* rwlock_init is a macro in linux/spinlock.h */ - /* slab usercopy - use regular kmem_cache_create */ #define kmem_cache_create_usercopy(n, sz, al, fl, uo, us, c) \ kmem_cache_create(n, sz, al, fl, c) -/* invalidate_inode_buffers, clear_inode are in linux/fs.h */ -/* fsverity_cleanup_inode is in linux/fsverity.h */ - -/* NFS export helpers are now in linux/exportfs.h */ - -/* Path operations - path_put, d_path are in linux/path.h */ - -/* I/O priority stubs are in linux/ioprio.h */ - -/* kmemdup_nul is in linux/slab.h */ -/* fscrypt declarations are in ext4_fscrypt.h */ - /* Memory allocation - declarations for stub.c */ void *kvzalloc(size_t size, gfp_t flags); #define kvmalloc(size, flags) kvzalloc(size, flags) -/* Time operations - ktime_get_ns is in linux/ktime.h */ -/* nsecs_to_jiffies is in linux/jiffies.h */ - -/* sb_start_write, sb_end_write are in linux/fs/super_types.h */ - -/* schedule_timeout_interruptible is in linux/sched.h */ - /* Page allocation - declarations for stub.c */ unsigned long get_zeroed_page(gfp_t gfp); void free_page(unsigned long addr); @@ -1098,8 +705,6 @@ void free_page(unsigned long addr); void *fs_dax_get_by_bdev(struct block_device *bdev, u64 *start, u64 *len, void *holder); -/* Block device atomic write stubs are in linux/blkdev.h */ - /* Superblock blocksize - declaration for stub.c */ int sb_set_blocksize(struct super_block *sb, int size); @@ -1114,10 +719,6 @@ int generic_check_addressable(unsigned int blocksize_bits, u64 num_blocks); u64 sb_bdev_nr_blocks(struct super_block *sb); unsigned int bdev_max_discard_sectors(struct block_device *bdev); -/* bgl_lock_init is now in linux/blockgroup_lock.h */ - -/* set_task_ioprio is in linux/ioprio.h */ - /* Superblock identity functions */ static inline void super_set_uuid(struct super_block *sb, const u8 *uuid, unsigned len) @@ -1136,16 +737,6 @@ static inline void super_set_uuid(struct super_block *sb, const u8 *uuid, #define xattr_handler_can_list(h, d) ({ (void)(h); (void)(d); 0; }) #define xattr_prefix(h) ({ (void)(h); (const char *)NULL; }) -/* I_MUTEX_* constants and inode locking stubs are in linux/fs.h */ - -/* PF_MEMALLOC_NOFS is in linux/sched.h */ - -/* generic_set_sb_d_ops, d_make_root are now in linux/dcache.h */ - -/* strreplace is in linux/string.h */ - -/* ratelimit_state_init is now in linux/ratelimit.h */ - /* Block device operations - declarations for stub.c */ void bdev_fput(void *file); void *bdev_file_open_by_dev(dev_t dev, int flags, void *holder, @@ -1154,48 +745,20 @@ void *bdev_file_open_by_dev(dev_t dev, int flags, void *holder, /* Filesystem sync - declaration for stub.c */ int sync_filesystem(void *sb); -/* Quota operations are in linux/quotaops.h */ - /* Block device file operations - stubs */ #define set_blocksize(f, size) ({ (void)(f); (void)(size); 0; }) struct buffer_head *__bread(struct block_device *bdev, sector_t block, unsigned size); -/* flush_workqueue is now in linux/workqueue.h */ - -/* Quota stubs for super.c are in linux/quotaops.h */ - /* * Stubs for mballoc.c */ -/* XArray is now in linux/xarray.h */ -/* Per-CPU stubs are in linux/percpu.h */ - -/* Little-endian bit operations are in asm-generic/bitops/le.h */ - -/* atomic64 operations are now in asm-generic/atomic.h */ - -/* get_cycles is in asm-generic/timex.h */ #include - -/* folio_address is in linux/pagemap.h */ - -/* sb_end_intwrite defined earlier */ - -/* WARN_RATELIMIT is in linux/ratelimit.h */ - -/* folio_get - now implemented in support.c */ - -/* array_index_nospec is in linux/nospec.h */ #include -/* atomic_inc_return and atomic_add_return are now in asm-generic/atomic.h */ - /* pde_data - proc dir entry data (not supported in U-Boot) */ #define pde_data(inode) ((void *)NULL) -/* struct seq_operations is in linux/seq_file.h */ - /* DEFINE_RAW_FLEX - define a flexible array struct on the stack (stubbed to NULL) */ #define DEFINE_RAW_FLEX(type, name, member, count) \ type *name = NULL @@ -1203,8 +766,6 @@ struct buffer_head *__bread(struct block_device *bdev, sector_t block, unsigned /* Block layer constants */ #define BLK_MAX_SEGMENT_SIZE 65536 -/* num_possible_cpus, alloc_percpu, free_percpu are in linux/percpu.h */ - /* Block device properties */ #define bdev_nonrot(bdev) ({ (void)(bdev); 0; }) @@ -1212,16 +773,9 @@ struct buffer_head *__bread(struct block_device *bdev, sector_t block, unsigned #define sb_issue_discard(sb, sector, nr_sects, gfp, flags) \ ({ (void)(sb); (void)(sector); (void)(nr_sects); (void)(gfp); (void)(flags); 0; }) -/* atomic_sub, atomic64_sub, atomic_dec_and_test are in asm-generic/atomic.h */ - -/* RCU list operations are in linux/rcupdate.h */ - /* raw_cpu_ptr - get pointer to per-CPU data for current CPU */ #define raw_cpu_ptr(ptr) (ptr) -/* schedule_timeout_uninterruptible, need_resched are in linux/sched.h */ - -/* sb_find_get_block_nonatomic, __find_get_block_nonatomic are in linux/buffer_head.h */ #define bdev_discard_granularity(bdev) \ ({ (void)(bdev); 0U; }) @@ -1230,40 +784,15 @@ struct buffer_head *__bread(struct block_device *bdev, sector_t block, unsigned */ #include -/* refcount operations are now in linux/refcount.h */ - -/* xchg is now in asm-generic/atomic.h */ - -/* printk_ratelimited is in linux/printk.h */ - -/* atomic_inc is in asm-generic/atomic.h */ -/* GFP_NOIO is in linux/slab.h */ - -/* fscrypt page-io stubs are in ext4_fscrypt.h */ - -/* folio writeback operations are in linux/pagemap.h */ -/* writeback control stubs are in linux/pagemap.h */ -/* bio_add_folio is in linux/bio.h */ - /* * Stubs for readpage.c */ -/* mempool is now in linux/mempool.h */ #include -/* folio read operations are in linux/pagemap.h */ -/* fscrypt readpage stubs are in ext4_fscrypt.h */ - -/* fsverity stubs are in linux/fsverity.h */ - -/* readahead operations are in linux/pagemap.h */ - /* prefetch operations */ #define prefetchw(addr) do { (void)(addr); } while (0) -/* block_read_full_folio is in linux/buffer_head.h */ - /* * Stubs for fast_commit.c */ @@ -1271,30 +800,13 @@ struct buffer_head *__bread(struct block_device *bdev, sector_t block, unsigned /* Wait bit operations - use linux/wait_bit.h */ #include -/* Dentry name snapshot operations are now in linux/dcache.h */ - -/* lockdep_assert_not_held is in linux/lockdep.h */ -/* REQ_IDLE, REQ_PREFLUSH are in linux/blk_types.h */ -/* wake_up_bit is now in linux/wait_bit.h */ - -/* d_alloc, d_drop are now in linux/dcache.h */ - -/* get_current_ioprio is in linux/ioprio.h */ - -/* JBD2 checkpoint.c stubs */ -/* mutex_lock_io is in linux/mutex.h */ -/* write_dirty_buffer is in linux/buffer_head.h */ -/* spin_needbreak is in linux/spinlock.h */ - -/* JBD2 commit.c stubs (folio_trylock is in linux/pagemap.h) */ -/* clear_bit_unlock is in asm-generic/bitops/lock.h */ +/* JBD2 checkpoint.c and commit.c stubs */ #include /* smp_mb__after_atomic is now in linux/smp.h */ #define ktime_get_coarse_real_ts64(ts) do { (ts)->tv_sec = 0; (ts)->tv_nsec = 0; } while (0) #define filemap_fdatawait_range_keep_errors(m, s, e) \ ({ (void)(m); (void)(s); (void)(e); 0; }) #define crc32_be(crc, p, len) crc32(crc, p, len) -/* free_buffer_head is in linux/buffer_head.h */ /* ext4l support functions (support.c) */ void ext4l_crc32c_init(void); @@ -1317,10 +829,7 @@ struct disk_partition *ext4l_get_partition(void); /* DEFINE_WAIT stub - creates a wait queue entry */ #define DEFINE_WAIT(name) int name = 0 -/* cond_resched_lock is in linux/sched.h */ - /* JBD2 journal.c stubs */ -/* alloc_buffer_head, __getblk are in linux/buffer_head.h */ int bmap(struct inode *inode, sector_t *block); /* seq_file operations for /proc - stubs */ @@ -1334,30 +843,19 @@ int bmap(struct inode *inode, sector_t *block); ssize_t seq_read(struct file *f, char *b, size_t s, loff_t *p); loff_t seq_lseek(struct file *f, loff_t o, int w); -/* S_IRUGO is in linux/fs.h */ - -/* procfs stubs are now in linux/proc_fs.h */ - -/* lockdep_init_map and lock_class_key are in linux/lockdep.h */ - /* Block device operations for journal.c */ -/* bh_read, bh_read_nowait, bh_readahead_batch are in linux/buffer_head.h */ #define truncate_inode_pages_range(m, s, e) \ do { (void)(m); (void)(s); (void)(e); } while (0) #define blkdev_issue_discard(bdev, s, n, gfp) \ ({ (void)(bdev); (void)(s); (void)(n); (void)(gfp); 0; }) #define blkdev_issue_zeroout(bdev, s, n, gfp, f) \ ({ (void)(bdev); (void)(s); (void)(n); (void)(gfp); (void)(f); 0; }) -/* SECTOR_SHIFT, SECTOR_SIZE are in linux/blk_types.h */ -/* mapping_max_folio_order is in linux/pagemap.h */ /* Memory allocation for journal.c */ #define __get_free_pages(gfp, order) ((unsigned long)memalign(PAGE_SIZE, PAGE_SIZE << (order))) #define free_pages(addr, order) free((void *)(addr)) #define get_order(size) ilog2(roundup_pow_of_two((size) / PAGE_SIZE)) -/* pr_notice_ratelimited is in linux/printk.h */ - /* * Stubs for mmp.c */ @@ -1373,23 +871,15 @@ loff_t seq_lseek(struct file *f, loff_t o, int w); #define down_write_nested(sem, subclass) \ do { (void)(sem); (void)(subclass); } while (0) -/* filemap_release_folio is in linux/pagemap.h */ - -/* IS_SWAPFILE is in linux/fs.h */ - /* PAGE_MASK - mask for page alignment */ #ifndef PAGE_MASK #define PAGE_MASK (~(PAGE_SIZE - 1)) #endif -/* lock_two_nondirectories, unlock_two_nondirectories are in linux/fs.h */ - /* * Stubs for resize.c */ -/* test_and_set_bit_lock is in asm-generic/bitops/lock.h */ - /* time_is_before_jiffies - check if time is before current jiffies */ #define time_is_before_jiffies(a) ({ (void)(a); 0; })