Message ID | ee22eaba04729cf6452ed1223c5187e617cfa4c1.1716874214.git.wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: basic header cleanups | expand |
On Tue, May 28, 2024 at 6:34 AM Qu Wenruo <wqu@suse.com> wrote: > > We have several headers that are including themselves, triggering clangd > warnings. > > Just remove such unnecessary include. > > Signed-off-by: Qu Wenruo <wqu@suse.com> Maybe add a Fixes: 602035d7fecf ("btrfs: add forward declarations and headers, part 2") Not sure how many people are using clangd or if it causes warnings with other tools. Anyway: Reviewed-by: Filipe Manana <fdmanana@suse.com> Thanks. > --- > fs/btrfs/btrfs_inode.h | 1 - > fs/btrfs/extent_map.h | 1 - > fs/btrfs/fs.h | 1 - > fs/btrfs/locking.h | 1 - > fs/btrfs/lru_cache.h | 1 - > 5 files changed, 5 deletions(-) > > diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h > index 97ce56a60672..08828e1ea1f7 100644 > --- a/fs/btrfs/btrfs_inode.h > +++ b/fs/btrfs/btrfs_inode.h > @@ -19,7 +19,6 @@ > #include <uapi/linux/btrfs_tree.h> > #include <trace/events/btrfs.h> > #include "block-rsv.h" > -#include "btrfs_inode.h" > #include "extent_map.h" > #include "extent_io.h" > #include "extent-io-tree.h" > diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h > index 2bcf7149b44c..d3d1e5b7528d 100644 > --- a/fs/btrfs/extent_map.h > +++ b/fs/btrfs/extent_map.h > @@ -9,7 +9,6 @@ > #include <linux/list.h> > #include <linux/refcount.h> > #include "misc.h" > -#include "extent_map.h" > #include "compression.h" > > struct btrfs_inode; > diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h > index 89f0650631cd..e6b1903f6c32 100644 > --- a/fs/btrfs/fs.h > +++ b/fs/btrfs/fs.h > @@ -29,7 +29,6 @@ > #include "extent-io-tree.h" > #include "async-thread.h" > #include "block-rsv.h" > -#include "fs.h" > > struct inode; > struct super_block; > diff --git a/fs/btrfs/locking.h b/fs/btrfs/locking.h > index 1bc8e6738879..3c15c75e0582 100644 > --- a/fs/btrfs/locking.h > +++ b/fs/btrfs/locking.h > @@ -11,7 +11,6 @@ > #include <linux/lockdep.h> > #include <linux/percpu_counter.h> > #include "extent_io.h" > -#include "locking.h" > > struct extent_buffer; > struct btrfs_path; > diff --git a/fs/btrfs/lru_cache.h b/fs/btrfs/lru_cache.h > index e32906ab6faa..07f1bb1c6aa3 100644 > --- a/fs/btrfs/lru_cache.h > +++ b/fs/btrfs/lru_cache.h > @@ -6,7 +6,6 @@ > #include <linux/types.h> > #include <linux/maple_tree.h> > #include <linux/list.h> > -#include "lru_cache.h" > > /* > * A cache entry. This is meant to be embedded in a structure of a user of > -- > 2.45.1 > >
On Tue, May 28, 2024 at 11:20:25AM +0100, Filipe Manana wrote: > On Tue, May 28, 2024 at 6:34 AM Qu Wenruo <wqu@suse.com> wrote: > > > > We have several headers that are including themselves, triggering clangd > > warnings. > > > > Just remove such unnecessary include. > > > > Signed-off-by: Qu Wenruo <wqu@suse.com> > > Maybe add a > > Fixes: 602035d7fecf ("btrfs: add forward declarations and headers, part 2") Adding Fixes: to tags could trigger the stable workflow and the patches could be picked for backport although it's not necessary. Mentioning the patch that introduced the problme in changelog text should be sufficient in such cases.
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 97ce56a60672..08828e1ea1f7 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -19,7 +19,6 @@ #include <uapi/linux/btrfs_tree.h> #include <trace/events/btrfs.h> #include "block-rsv.h" -#include "btrfs_inode.h" #include "extent_map.h" #include "extent_io.h" #include "extent-io-tree.h" diff --git a/fs/btrfs/extent_map.h b/fs/btrfs/extent_map.h index 2bcf7149b44c..d3d1e5b7528d 100644 --- a/fs/btrfs/extent_map.h +++ b/fs/btrfs/extent_map.h @@ -9,7 +9,6 @@ #include <linux/list.h> #include <linux/refcount.h> #include "misc.h" -#include "extent_map.h" #include "compression.h" struct btrfs_inode; diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h index 89f0650631cd..e6b1903f6c32 100644 --- a/fs/btrfs/fs.h +++ b/fs/btrfs/fs.h @@ -29,7 +29,6 @@ #include "extent-io-tree.h" #include "async-thread.h" #include "block-rsv.h" -#include "fs.h" struct inode; struct super_block; diff --git a/fs/btrfs/locking.h b/fs/btrfs/locking.h index 1bc8e6738879..3c15c75e0582 100644 --- a/fs/btrfs/locking.h +++ b/fs/btrfs/locking.h @@ -11,7 +11,6 @@ #include <linux/lockdep.h> #include <linux/percpu_counter.h> #include "extent_io.h" -#include "locking.h" struct extent_buffer; struct btrfs_path; diff --git a/fs/btrfs/lru_cache.h b/fs/btrfs/lru_cache.h index e32906ab6faa..07f1bb1c6aa3 100644 --- a/fs/btrfs/lru_cache.h +++ b/fs/btrfs/lru_cache.h @@ -6,7 +6,6 @@ #include <linux/types.h> #include <linux/maple_tree.h> #include <linux/list.h> -#include "lru_cache.h" /* * A cache entry. This is meant to be embedded in a structure of a user of
We have several headers that are including themselves, triggering clangd warnings. Just remove such unnecessary include. Signed-off-by: Qu Wenruo <wqu@suse.com> --- fs/btrfs/btrfs_inode.h | 1 - fs/btrfs/extent_map.h | 1 - fs/btrfs/fs.h | 1 - fs/btrfs/locking.h | 1 - fs/btrfs/lru_cache.h | 1 - 5 files changed, 5 deletions(-)