]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Remove unnecessary casts in btrfs_read_root_item
authorYueHaibing <yuehaibing@huawei.com>
Wed, 20 Feb 2019 12:32:02 +0000 (12:32 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Feb 2019 13:19:23 +0000 (14:19 +0100)
commitc6e72e4d8705510cad1ea30af7f22a639a200475
tree6cc60e13debb16510fe5387ff6932a4e99dd7f81
parent381955b43370d1bab64ad73ad9e6956ce785fc58
btrfs: Remove unnecessary casts in btrfs_read_root_item

There is a messy cast here:
min_t(int, len, (int)sizeof(*item)));

min_t() should normally cast to unsigned.  It's not possible for "len"
to be negative, but if it were then we definitely wouldn't want to pass
negatives to read_extent_buffer().  Also there is an extra cast.

This patch shouldn't affect runtime, it's just a clean up.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/root-tree.c