[Concept,06/34] ext4l: Move flush_workqueue to linux/workqueue.h

Message ID 20260114225635.3407989-7-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:55 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Move the flush_workqueue stub from ext4_uboot.h to the common
linux/workqueue.h header where other workqueue stubs reside.

Also simplify the quota stubs section by removing the unnecessary
_LINUX_QUOTAOPS_H guard, since quotaops.h is not included.

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

 fs/ext4l/ext4_uboot.h     | 7 ++-----
 include/linux/workqueue.h | 4 ++++
 2 files changed, 6 insertions(+), 5 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 8a160a2db19..2ffa8ab271b 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -353,15 +353,13 @@  struct buffer_head *sb_getblk(struct super_block *sb, sector_t block);
 /* Group permission - stub */
 #define in_group_p(gid)			(0)
 
-/* Quota operations - stubs (only define if quotaops.h not included) */
-#ifndef _LINUX_QUOTAOPS_H
+/* Quota operations - stubs */
 #define dquot_alloc_block_nofail(inode, nr)	\
 	({ (inode)->i_blocks += (nr) << ((inode)->i_blkbits - 9); 0; })
 #define dquot_initialize(inode)			({ (void)(inode); 0; })
 #define dquot_free_inode(inode)			do { (void)(inode); } while (0)
 #define dquot_alloc_inode(inode)		({ (void)(inode); 0; })
 #define dquot_drop(inode)			do { (void)(inode); } while (0)
-#endif /* _LINUX_QUOTAOPS_H */
 
 /* icount - inode reference count */
 #define icount_read(inode)			(1)
@@ -2403,8 +2401,7 @@  void dquot_free_block(struct inode *inode, loff_t nr);
 #define set_blocksize(f, size)		({ (void)(f); (void)(size); 0; })
 struct buffer_head *__bread(struct block_device *bdev, sector_t block, unsigned size);
 
-/* Workqueue operations - stubs */
-#define flush_workqueue(wq)		do { (void)(wq); } while (0)
+/* flush_workqueue is now in linux/workqueue.h */
 
 /* Quota stubs for super.c */
 #define dquot_writeback_dquots(sb, type) do { (void)(sb); (void)(type); } while (0)
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 66f61fa6e77..2ae57341861 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -79,6 +79,10 @@  static inline void destroy_workqueue(struct workqueue_struct *wq)
 {
 }
 
+static inline void flush_workqueue(struct workqueue_struct *wq)
+{
+}
+
 /* System workqueues - all stubs in U-Boot */
 #define system_dfl_wq		((struct workqueue_struct *)1)
 #define system_wq		((struct workqueue_struct *)1)