Skip to content

Commit 4bfa8ad

Browse files
MiaoheLintorvalds
authored andcommitted
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]>
1 parent 56a8c8e commit 4bfa8ad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mm/shmem.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3965,8 +3965,7 @@ static ssize_t shmem_enabled_store(struct kobject *kobj,
39653965
return count;
39663966
}
39673967

3968-
struct kobj_attribute shmem_enabled_attr =
3969-
__ATTR(shmem_enabled, 0644, shmem_enabled_show, shmem_enabled_store);
3968+
struct kobj_attribute shmem_enabled_attr = __ATTR_RW(shmem_enabled);
39703969
#endif /* CONFIG_TRANSPARENT_HUGEPAGE && CONFIG_SYSFS */
39713970

39723971
#else /* !CONFIG_SHMEM */

0 commit comments

Comments
 (0)