]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/swap: use helper macro __ATTR_RW
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 19 May 2022 21:08:50 +0000 (14:08 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 19 May 2022 21:08:50 +0000 (14:08 -0700)
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.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar 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: Andrew Morton <akpm@linux-foundation.org>
mm/swap_state.c

index 4667fa406b14321b93e8938faf14dfe4a56c582a..b9e4ed2e90bf4f2228784bb2ed0bf09aaa456a31 100644 (file)
@@ -884,9 +884,7 @@ static ssize_t vma_ra_enabled_store(struct kobject *kobj,
 
        return count;
 }
-static struct kobj_attribute vma_ra_enabled_attr =
-       __ATTR(vma_ra_enabled, 0644, vma_ra_enabled_show,
-              vma_ra_enabled_store);
+static struct kobj_attribute vma_ra_enabled_attr = __ATTR_RW(vma_ra_enabled);
 
 static struct attribute *swap_attrs[] = {
        &vma_ra_enabled_attr.attr,