From patchwork Sat Jul 15 03:37:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 13314371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB3E3C001DC for ; Sat, 15 Jul 2023 03:37:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0DED16B0071; Fri, 14 Jul 2023 23:37:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 08F5D6B0072; Fri, 14 Jul 2023 23:37:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EBF616B0074; Fri, 14 Jul 2023 23:37:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id DC6FD6B0071 for ; Fri, 14 Jul 2023 23:37:05 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A91A51401CE for ; Sat, 15 Jul 2023 03:37:05 +0000 (UTC) X-FDA: 81012435210.19.1468E9B Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf10.hostedemail.com (Postfix) with ESMTP id 7ED07C000B for ; Sat, 15 Jul 2023 03:37:03 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689392224; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=B2t28hcJ9F+/xHaYrx6BM84cA6mDN9ZeNQFhSsWLxJM=; b=xQgsWJbnma1nwnMf09NwQgZxFLp+gu/NLYoh3irP6QzHGVsaLQ4fwt0Zf0B1YjXAhzVoou z3Jn2fC3SCbw6yAVXwVA0Kbq2Hdr50ey+yk6BTqAO6L4La/Fmm7iOE4AmLMAun/9Z1dNIr 0oqWzNHGb6u0q04fXXzBCE34aqhKgxg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689392224; a=rsa-sha256; cv=none; b=Rf2lz4QQiE8AGKYRw4SNOdwTz3xmoFYdifpWDjfx/CUm4K6HY5HWpsiLzJ+tFUX23FaAEn +du5bmCnTzHXKzQkjpTNufkMeyGfJ9JmRn720Z0nCiAnOkGNgCmaZvi6C0+bhfO7F7b7/4 JWgB0jGpX0njXmQeg0fhUbZ8huQBx18= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; spf=pass (imf10.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4R2v973F39zLnlY; Sat, 15 Jul 2023 11:34:35 +0800 (CST) Received: from huawei.com (10.174.151.185) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sat, 15 Jul 2023 11:36:58 +0800 From: Miaohe Lin To: CC: , , Subject: [PATCH] memory tier: Use helper macro __ATTR_RW() Date: Sat, 15 Jul 2023 11:37:08 +0800 Message-ID: <20230715033708.2568201-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 7ED07C000B X-Rspam-User: X-Stat-Signature: 9ccyxb7pg8jbqfyxomj1x99qmbmj48bx X-Rspamd-Server: rspam03 X-HE-Tag: 1689392223-977516 X-HE-Meta: U2FsdGVkX1+UU94Fm8kGwpe2rLWb6ez3OEI843+CoiJ4CGE6APbraaAfaShextLd+bKFEdpWa9n3nI7s2YGB7ZvEOZFN8uh3L9JGl5vMwtXgyqP8lN0TqgtOh3Z7XBj0F9Lt9YndiYIkAXA2ebInkZhshJPhNIfKdS+xEEljyi0++xIfps1UlKkG7xD93ZwBlKO2EB/dgE/AHymU0DQKHS5oKPBC/NnKng9W3YG0m3cDC7sqMItfxf4K78cnrGonR2GZyvj4kdJtXuuUy5D8lB/s3pjD5cyaHyv0C7/RD97Xe9T9BxbIssB8MynYc4nTprddlg9vinW6n9ddCb+T3qol5j6V5lPAISAnLvatmbiX6gb2WPBtAP8MDc9dqbkWzhS8ygU8clliZ8rHbScbFQMhbHCQHQ+pnlCLjje93CAnZmDYPJ9LNx7pxL4/G4XmmAj8qMGJp3PEvZls5nIkGqSBp7gvTD+wWW8tST/QgF3soFgGbbbJjBkRoE9u/vHh7pOxDadVpzsX0WSf9VQRCQZgDnOGLmbdbtvizzMgviCeHe9ENvyJMgnYYNe0Psyz0XHIrj8bqFxkDfJUa6RECdGj3emIqEE/0f9a3owu/Y8831Fzs3ld0/PE9jhCffMZ6Px1P5BfBv9rvYWKuimLwFlR48suxcOlGvbWJgm51yvCAZ8VBjc8oRjR0zAU3VMl0qCD8+IQmHQipuSNOfOv0NF9sRCDfuzOEu0MFMzB0BpSM2cj4zhLT990eX2aOJenlIpFFLjH3/7CCGuyeO7uwA5mYhdfUpeQap50Oc2sgVmbSHE8iGeJ1UhV/lXK/+Rn61E73X+Xh0G4AStp9uM8Q02iHoe1LOIfm3c9wRiIGH57hTA8a6jpEAnA64lTA1NFfz6WqNF3JtcwKC8jqI3I8eL2+nqOeZaX5gXmdMIsztkryAEaxfs26Yct6QuhigbKNmY29yQIsLcw0wKlnCB vtCDB6cv Nhxn5CY2ijA0KqgOLccouiszkuUvKUJo4lhXWMf5ROJ6ut9Uqvw225wP1pNUe43AHebPj38AbLV80jyKAH7jl+xCn9nw0PxFX6wSpwwcMH0YyimtvdG1F/QYNn6Ytj3LPe0vPfRJPWF6XvgRd5WK5LuR35nIkmZhTauI50F20NfQU/abgUmrnxqcic/1ZlfAzQaEb X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Use helper macro __ATTR_RW to define numa demotion attributes. Minor readability improvement. Signed-off-by: Miaohe Lin --- mm/memory-tiers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c index c49ab03f49b1..2898701b5209 100644 --- a/mm/memory-tiers.c +++ b/mm/memory-tiers.c @@ -693,8 +693,7 @@ static ssize_t numa_demotion_enabled_store(struct kobject *kobj, } static struct kobj_attribute numa_demotion_enabled_attr = - __ATTR(demotion_enabled, 0644, numa_demotion_enabled_show, - numa_demotion_enabled_store); + __ATTR_RW(numa_demotion_enabled); static struct attribute *numa_attrs[] = { &numa_demotion_enabled_attr.attr,