btrfs: add __pure attribute to functions
authorDavid Sterba <dsterba@suse.com>
Tue, 1 Oct 2019 17:57:39 +0000 (19:57 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 11:46:52 +0000 (12:46 +0100)
commite1f60a6580c04d0d2492bb6034e968b8c29c78cf
tree56ef88afaeba63621dafb6b83d8cef6760fd9f35
parent4143cb8b6f00910e73a7503fd922211b9f08cf48
btrfs: add __pure attribute to functions

The attribute is more relaxed than const and the functions could
dereference pointers, as long as the observable state is not changed. We
do have such functions, based on -Wsuggest-attribute=pure .

The visible effects of this patch are negligible, there are differences
in the assembly but hard to summarize.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/async-thread.c
fs/btrfs/async-thread.h
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/dev-replace.c
fs/btrfs/dev-replace.h
fs/btrfs/ioctl.c
fs/btrfs/space-info.c
fs/btrfs/space-info.h