]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: constify and cleanup variables in comparators
authorDavid Sterba <dsterba@suse.com>
Mon, 26 Jul 2021 12:15:26 +0000 (14:15 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:03 +0000 (13:19 +0200)
commitb97c68a19ae03e10cbcee2106fc3f5d59747b0b6
treecd0d581c411f8c12f6c1140fdf16ee434c4f8a32
parent5a9bad26441add647d7e8b8760ebcef79f31f94c
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>
fs/btrfs/raid56.c
fs/btrfs/send.c
fs/btrfs/super.c
fs/btrfs/tree-log.c
fs/btrfs/volumes.c