Skip to contentSkip to conversation

xfs: Remove header files which are included more than once

PATCH In review Wenchao Hao 2 participants 2 messages Jun 6, 2024 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: Remove header files which are included more than once

Following warning is reported, so remove these duplicated header including:

./fs/xfs/libxfs/xfs_trans_resv.c: xfs_da_format.h is included more than once. ./fs/xfs/scrub/quota_repair.c: xfs_format.h is included more than once. ./fs/xfs/xfs_handle.c: xfs_da_btree.h is included more than once. ./fs/xfs/xfs_qm_bhv.c: xfs_mount.h is included more than once. ./fs/xfs/xfs_trace.c: xfs_bmap.h is included more than once.

This is just a clean code, no logic changed.

---
 fs/xfs/libxfs/xfs_trans_resv.c | 1 -
 fs/xfs/scrub/quota_repair.c    | 1 -
 fs/xfs/xfs_handle.c            | 1 -
 fs/xfs/xfs_qm_bhv.c            | 1 -
 fs/xfs/xfs_trace.c             | 1 -
 5 files changed, 5 deletions(-)
fs/xfs/libxfs/xfs_trans_resv.c +0 -1
index 6dbe6e7251e7..3dc8f785bf29 100644
@@ -22,7 +22,6 @@
 #include "xfs_rtbitmap.h"
 #include "xfs_attr_item.h"
 #include "xfs_log.h"
-#include "xfs_da_format.h"
 
 #define _ALLOC	true
 #define _FREE	false
fs/xfs/scrub/quota_repair.c +0 -1
index 90cd1512bba9..cd51f10f2920 100644
@@ -12,7 +12,6 @@
 #include "xfs_defer.h"
 #include "xfs_btree.h"
 #include "xfs_bit.h"
-#include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans.h"
 #include "xfs_sb.h"
fs/xfs/xfs_handle.c +0 -1
index a3f16e9b6fe5..cf5acbd3c7ca 100644
@@ -21,7 +21,6 @@
 #include "xfs_attr.h"
 #include "xfs_ioctl.h"
 #include "xfs_parent.h"
-#include "xfs_da_btree.h"
 #include "xfs_handle.h"
 #include "xfs_health.h"
 #include "xfs_icache.h"
fs/xfs/xfs_qm_bhv.c +0 -1
index 271c1021c733..a11436579877 100644
@@ -11,7 +11,6 @@
 #include "xfs_trans_resv.h"
 #include "xfs_mount.h"
 #include "xfs_quota.h"
-#include "xfs_mount.h"
 #include "xfs_inode.h"
 #include "xfs_trans.h"
 #include "xfs_qm.h"
fs/xfs/xfs_trace.c +0 -1
index 9c7fbaae2717..e1ec56d95791 100644
@@ -38,7 +38,6 @@
 #include "xfs_iomap.h"
 #include "xfs_buf_mem.h"
 #include "xfs_btree_mem.h"
-#include "xfs_bmap.h"
 #include "xfs_exchmaps.h"
 #include "xfs_exchrange.h"
 #include "xfs_parent.h"
Signature · 1 line
2.38.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Wenchao Hao

Following warning is reported, so remove these duplicated header including:

./fs/xfs/libxfs/xfs_trans_resv.c: xfs_da_format.h is included more than once. ./fs/xfs/scrub/quota_repair.c: xfs_format.h is included more than once. ./fs/xfs/xfs_handle.c: xfs_da_btree.h is included more than once. ./fs/xfs/xfs_qm_bhv.c: xfs_mount.h is included more than once. ./fs/xfs/xfs_trace.c: xfs_bmap.h is included more than once.

Quoted 3 lines

This is just a clean code, no logic changed.

Assuming this doesn't break the build, looks fine to me

--D

Quoted 72 lines
---
 fs/xfs/libxfs/xfs_trans_resv.c | 1 -
 fs/xfs/scrub/quota_repair.c    | 1 -
 fs/xfs/xfs_handle.c            | 1 -
 fs/xfs/xfs_qm_bhv.c            | 1 -
 fs/xfs/xfs_trace.c             | 1 -
 5 files changed, 5 deletions(-)
fs/xfs/libxfs/xfs_trans_resv.c +0 -1
index 6dbe6e7251e7..3dc8f785bf29 100644
@@ -22,7 +22,6 @@
 #include "xfs_rtbitmap.h"
 #include "xfs_attr_item.h"
 #include "xfs_log.h"
-#include "xfs_da_format.h"
 
 #define _ALLOC	true
 #define _FREE	false
fs/xfs/scrub/quota_repair.c +0 -1
index 90cd1512bba9..cd51f10f2920 100644
@@ -12,7 +12,6 @@
 #include "xfs_defer.h"
 #include "xfs_btree.h"
 #include "xfs_bit.h"
-#include "xfs_format.h"
 #include "xfs_log_format.h"
 #include "xfs_trans.h"
 #include "xfs_sb.h"
fs/xfs/xfs_handle.c +0 -1
index a3f16e9b6fe5..cf5acbd3c7ca 100644
@@ -21,7 +21,6 @@
 #include "xfs_attr.h"
 #include "xfs_ioctl.h"
 #include "xfs_parent.h"
-#include "xfs_da_btree.h"
 #include "xfs_handle.h"
 #include "xfs_health.h"
 #include "xfs_icache.h"
fs/xfs/xfs_qm_bhv.c +0 -1
index 271c1021c733..a11436579877 100644
@@ -11,7 +11,6 @@
 #include "xfs_trans_resv.h"
 #include "xfs_mount.h"
 #include "xfs_quota.h"
-#include "xfs_mount.h"
 #include "xfs_inode.h"
 #include "xfs_trans.h"
 #include "xfs_qm.h"
fs/xfs/xfs_trace.c +0 -1
index 9c7fbaae2717..e1ec56d95791 100644
@@ -38,7 +38,6 @@
 #include "xfs_iomap.h"
 #include "xfs_buf_mem.h"
 #include "xfs_btree_mem.h"
-#include "xfs_bmap.h"
 #include "xfs_exchmaps.h"
 #include "xfs_exchrange.h"
 #include "xfs_parent.h"
Signature · 1 line
2.38.1