diff options
author | Miaohe Lin <[email protected]> | 2022-03-22 14:40:04 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2022-03-22 15:57:02 -0700 |
commit | 4bfa8ada803af1d073c76b43d079eee72a1d442a (patch) | |
tree | 8e23b5ad7c6ceff17537208c97a5ef7c1e9b8945 | |
parent | 56a8c8eb1eaf21261be8cdc4e3715239ac087342 (diff) |
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/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/shmem.c | 3 |
1 files changed, 1 insertions, 2 deletions
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 */ |