From: Miaohe Lin Date: Tue, 22 Mar 2022 21:40:04 +0000 (-0700) Subject: mm: shmem: use helper macro __ATTR_RW X-Git-Tag: v6.6-pxa1908~4323^2~196 X-Git-Url: https://git.dujemihanovic.xyz/?a=commitdiff_plain;h=4bfa8ada803af1d073c76b43d079eee72a1d442a;p=linux.git mm: shmem: use helper macro __ATTR_RW Use helper macro __ATTR_RW to define shmem_enabled_attr to make code more clear. Minor readability improvement. Link: https://lkml.kernel.org/r/20220312082252.55586-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/shmem.c b/mm/shmem.c index 83f99e7c00b0..49447c5410d8 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3965,8 +3965,7 @@ static ssize_t shmem_enabled_store(struct kobject *kobj, return count; } -struct kobj_attribute shmem_enabled_attr = - __ATTR(shmem_enabled, 0644, shmem_enabled_show, shmem_enabled_store); +struct kobj_attribute shmem_enabled_attr = __ATTR_RW(shmem_enabled); #endif /* CONFIG_TRANSPARENT_HUGEPAGE && CONFIG_SYSFS */ #else /* !CONFIG_SHMEM */