btrfs: constify and cleanup variables in comparators
Comparators just read the data and thus get const parameters. This should be also preserved by the local variables, update all comparators passed to sort or bsearch. Cleanups: - unnecessary casts are dropped - btrfs_cmp_device_free_bytes is cleaned up to follow the common pattern and 'inline' is dropped as the function address is taken Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -4191,7 +4191,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans,
|
||||
static int extent_cmp(void *priv, const struct list_head *a,
|
||||
const struct list_head *b)
|
||||
{
|
||||
struct extent_map *em1, *em2;
|
||||
const struct extent_map *em1, *em2;
|
||||
|
||||
em1 = list_entry(a, struct extent_map, list);
|
||||
em2 = list_entry(b, struct extent_map, list);
|
||||
|
||||
Reference in New Issue
Block a user