From: David Sterba Date: Tue, 22 Apr 2025 15:32:17 +0000 (+0200) Subject: btrfs: remove unused btrfs_io_stripe::length X-Git-Tag: block-6.16-20250606~42^2~104 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d4d788a776b49c1e8961104caa2b715bc49074af;p=linux-2.6-block.git btrfs: remove unused btrfs_io_stripe::length First added (but not effectively used) in 02c372e1f016e5 ("btrfs: add support for inserting raid stripe extents"). The structure is initialized to zeros so the only use in btrfs_insert_one_raid_extent() u64 length = bioc->stripes[i].length; struct btrfs_raid_stride *raid_stride = &stripe_extent->strides[i]; if (length == 0) length = bioc->size; the 'if' always happens. Last use in 4016358e852861 ("btrfs: remove unused variable length in btrfs_insert_one_raid_extent()") was an obvious cleanup. It seems to be safe to remove, raid-stripe-tree works without using it since 6.6. This was found by tool https://github.com/jirislaby/clang-struct . Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba --- diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index e247d551da67..72b8122938eb 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -473,7 +473,6 @@ struct btrfs_io_stripe { struct btrfs_device *dev; /* Block mapping. */ u64 physical; - u64 length; bool rst_search_commit_root; /* For the endio handler. */ struct btrfs_io_context *bioc;