lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 22 Feb 2022 19:27:31 +0800 From: Miaohe Lin <linmiaohe@...wei.com> To: <akpm@...ux-foundation.org>, <mike.kravetz@...cle.com> CC: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>, <linmiaohe@...wei.com> Subject: [PATCH] mm/hugetlb: use helper macro __ATTR_RW Use helper macro __ATTR_RW to define HSTATE_ATTR to make code more clear. Minor readability improvement. Signed-off-by: Miaohe Lin <linmiaohe@...wei.com> --- mm/hugetlb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 1f0cca036f7f..c0405f3c8413 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3498,8 +3498,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]; -- 2.23.0
Powered by blists - more mailing lists