From: Miaohe Lin Date: Tue, 22 Mar 2022 21:45:23 +0000 (-0700) Subject: mm/hugetlb: use helper macro __ATTR_RW X-Git-Tag: v6.1-rc5~1778^2~92 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98bc26ac770fe507b4c23f5ee748f641146fb076;p=platform%2Fkernel%2Flinux-starfive.git mm/hugetlb: use helper macro __ATTR_RW Use helper macro __ATTR_RW to define HSTATE_ATTR to make code more clear. Minor readability improvement. Link: https://lkml.kernel.org/r/20220222112731.33479-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index c57eea5..369ff07 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3499,8 +3499,7 @@ static int demote_pool_huge_page(struct hstate *h, nodemask_t *nodes_allowed) static struct kobj_attribute _name##_attr = __ATTR_WO(_name) #define HSTATE_ATTR(_name) \ - static struct kobj_attribute _name##_attr = \ - __ATTR(_name, 0644, _name##_show, _name##_store) + static struct kobj_attribute _name##_attr = __ATTR_RW(_name) static struct kobject *hugepages_kobj; static struct kobject *hstate_kobjs[HUGE_MAX_HSTATE];