]> 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)
commit15422f4b4f9b2fdfe3f94dd96cfb31669c292987
treecd0d581c411f8c12f6c1140fdf16ee434c4f8a32
parenta13785f494edd4b4b2565b1e110e762cd217c523
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