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:
@@ -541,7 +541,7 @@ static noinline int btrfs_ioctl_fitrim(struct file *file, void __user *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int btrfs_is_empty_uuid(u8 *uuid)
|
||||
int __pure btrfs_is_empty_uuid(u8 *uuid)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
Reference in New Issue
Block a user