Commit 6106b93e authored by Miaohe Lin's avatar Miaohe Lin Committed by akpm

mm/swap: use helper macro __ATTR_RW

Use helper macro __ATTR_RW to define vma_ra_enabled_attr to make code more
clear.  Minor readability improvement.

Link: https://lkml.kernel.org/r/20220509131416.17553-3-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarOscar Salvador <osalvador@suse.de>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Peter Xu <peterx@redhat.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 92bafb20
...@@ -884,9 +884,7 @@ static ssize_t vma_ra_enabled_store(struct kobject *kobj, ...@@ -884,9 +884,7 @@ static ssize_t vma_ra_enabled_store(struct kobject *kobj,
return count; return count;
} }
static struct kobj_attribute vma_ra_enabled_attr = static struct kobj_attribute vma_ra_enabled_attr = __ATTR_RW(vma_ra_enabled);
__ATTR(vma_ra_enabled, 0644, vma_ra_enabled_show,
vma_ra_enabled_store);
static struct attribute *swap_attrs[] = { static struct attribute *swap_attrs[] = {
&vma_ra_enabled_attr.attr, &vma_ra_enabled_attr.attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment