From: David Sterba Date: Tue, 6 Jan 2026 16:20:25 +0000 (+0100) Subject: btrfs: unify types for binary search variables X-Git-Tag: v7.1-rc1~231^2~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5b6b23c4572694da7b767a04826b06b10712bf0;p=thirdparty%2Fkernel%2Flinux.git btrfs: unify types for binary search variables The variables calculating where to jump next are using mixed in types which requires some conversions on the instruction level. Using 'u32' removes one call to 'movslq', making the main loop shorter. This complements type conversion done in a724f313f84beb ("btrfs: do unsigned integer division in the extent buffer binary search loop") Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index eae69e205b288..273865bd4be41 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -771,7 +771,7 @@ int btrfs_bin_search(const struct extent_buffer *eb, int first_slot, unsigned long offset; struct btrfs_disk_key *tmp; struct btrfs_disk_key unaligned; - int mid; + u32 mid; mid = (low + high) / 2; offset = p + mid * item_size;