btrfs: use the correct const function attribute for btrfs_get_num_csums
authorDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 15:38:19 +0000 (17:38 +0200)
committerDavid Sterba <dsterba@suse.com>
Wed, 19 Aug 2020 16:39:21 +0000 (18:39 +0200)
commit604997b4a3803f33e70799b2696bd3dbfed7276c
tree0a0e243657829914d40e317533e34b653ec6103c
parent282dd7d7718444679b046b769d872b188818ca35
btrfs: use the correct const function attribute for btrfs_get_num_csums

The build robot reports

compiler: h8300-linux-gcc (GCC) 9.3.0
   In file included from fs/btrfs/tests/extent-map-tests.c:8:
>> fs/btrfs/tests/../ctree.h:2166:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    2166 | size_t __const btrfs_get_num_csums(void);
         |        ^~~~~~~

The function attribute for const does not follow the expected scheme and
in this case is confused with a const type qualifier.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c
fs/btrfs/ctree.h