mbox series

[0/5] Remove some unused struct members

Message ID cover.1700531088.git.dsterba@suse.com (mailing list archive)
Headers show
Series Remove some unused struct members | expand

Message

David Sterba Nov. 21, 2023, 1:50 a.m. UTC
Jiri Slaby wrote a tool to find unused struct members [1]. There are
some interesting fossils. Comparing that to my hacky coccinelle scripts,
it did a much better job.

[1] https://github.com/jirislaby/clang-struct

David Sterba (5):
  btrfs: scrub: remove unused scrub_ctx::sectors_per_bio
  btrfs: remove unused btrfs_ordered_extent::outstanding_isize
  btrfs: raid56: remove unused btrfs_plug_cb::work
  btrfs: remove unused definition of tree_entry in extent-io-tree.c
  btrfs: remove unused btrfs_root::type

 fs/btrfs/ctree.h          | 2 --
 fs/btrfs/extent-io-tree.c | 6 ------
 fs/btrfs/ordered-data.h   | 7 -------
 fs/btrfs/raid56.c         | 1 -
 fs/btrfs/scrub.c          | 1 -
 5 files changed, 17 deletions(-)

Comments

Qu Wenruo Nov. 21, 2023, 3:50 a.m. UTC | #1
On 2023/11/21 12:20, David Sterba wrote:
> Jiri Slaby wrote a tool to find unused struct members [1]. There are
> some interesting fossils. Comparing that to my hacky coccinelle scripts,
> it did a much better job.

Reviewed-by: Qu Wenruo <wqu@suse.com>

>
> [1] https://github.com/jirislaby/clang-struct

The tool looks awesome!

Thanks,
Qu
>
> David Sterba (5):
>    btrfs: scrub: remove unused scrub_ctx::sectors_per_bio
>    btrfs: remove unused btrfs_ordered_extent::outstanding_isize
>    btrfs: raid56: remove unused btrfs_plug_cb::work
>    btrfs: remove unused definition of tree_entry in extent-io-tree.c
>    btrfs: remove unused btrfs_root::type
>
>   fs/btrfs/ctree.h          | 2 --
>   fs/btrfs/extent-io-tree.c | 6 ------
>   fs/btrfs/ordered-data.h   | 7 -------
>   fs/btrfs/raid56.c         | 1 -
>   fs/btrfs/scrub.c          | 1 -
>   5 files changed, 17 deletions(-)
>
Anand Jain Nov. 21, 2023, 4:31 a.m. UTC | #2
For the patchset.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Johannes Thumshirn Nov. 21, 2023, 8:45 a.m. UTC | #3
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
David Sterba Nov. 21, 2023, 1:05 p.m. UTC | #4
On Tue, Nov 21, 2023 at 02:50:10AM +0100, David Sterba wrote:
> Jiri Slaby wrote a tool to find unused struct members [1]. There are
> some interesting fossils. Comparing that to my hacky coccinelle scripts,
> it did a much better job.
> 
> [1] https://github.com/jirislaby/clang-struct
> 
> David Sterba (5):
>   btrfs: scrub: remove unused scrub_ctx::sectors_per_bio
>   btrfs: remove unused btrfs_ordered_extent::outstanding_isize
>   btrfs: raid56: remove unused btrfs_plug_cb::work
>   btrfs: remove unused definition of tree_entry in extent-io-tree.c
>   btrfs: remove unused btrfs_root::type

Added to misc-next.