mbox series

[0/2] btrfs: basic header cleanups

Message ID cover.1716874214.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs: basic header cleanups | expand

Message

Qu Wenruo May 28, 2024, 5:33 a.m. UTC
While reading headers, clangd would do a lot of extra checks, from the
very basic like including the header itself, to missing type definition
inside the header's include chain.

There are 2 very basic fixes can be done immediately:

- Do not do recursive include

- Do not include rwlock_types.h
  As it already mentioned to include spinlock_types.h instead.

Qu Wenruo (2):
  btrfs: cleanup recursive include of the same header
  btrfs: do not directly rwlock_types.h

 fs/btrfs/btrfs_inode.h | 1 -
 fs/btrfs/extent_map.h  | 3 +--
 fs/btrfs/fs.h          | 1 -
 fs/btrfs/locking.h     | 1 -
 fs/btrfs/lru_cache.h   | 1 -
 5 files changed, 1 insertion(+), 6 deletions(-)

Comments

David Sterba May 28, 2024, 3:33 p.m. UTC | #1
On Tue, May 28, 2024 at 03:03:46PM +0930, Qu Wenruo wrote:
> While reading headers, clangd would do a lot of extra checks, from the
> very basic like including the header itself, to missing type definition
> inside the header's include chain.
> 
> There are 2 very basic fixes can be done immediately:
> 
> - Do not do recursive include
> 
> - Do not include rwlock_types.h
>   As it already mentioned to include spinlock_types.h instead.
> 
> Qu Wenruo (2):
>   btrfs: cleanup recursive include of the same header
>   btrfs: do not directly rwlock_types.h

Reviewed-by: David Sterba <dsterba@suse.com>