mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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>
This commit is contained in:
@@ -986,7 +986,7 @@ static int btrfs_dev_replace_kthread(void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace)
|
||||
int __pure btrfs_dev_replace_is_ongoing(struct btrfs_dev_replace *dev_replace)
|
||||
{
|
||||
if (!dev_replace->is_valid)
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user