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: 120747 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp12286vqt; Fri, 14 Jul 2023 21:30:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlF3s4bFwhDjBtl2kX/hQ086UZIWhUTvgTbTgTKGm3banmQBaRADIybuR2cHTKWsxq1B00H5 X-Received: by 2002:a05:6a20:e685:b0:131:5995:340 with SMTP id mz5-20020a056a20e68500b0013159950340mr5161654pzb.20.1689395429441; Fri, 14 Jul 2023 21:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689395429; cv=none; d=google.com; s=arc-20160816; b=expuhtL1iD1KWOxWk6jDLf8e4dpItEStPLwpGTubvYfpq8OLok56/3/6Pm4KsuzF3+ /+Ck/fH/HHRgMt6cmRIe/eL9BbMSJSE0CZYFWh3b6LXbbSpE3pgkkxPZALohtDziImwF znXPAFl6JzXJYK8991oRwqQ/hoGLnAIJyNAvlANP+FvcNTc2FzUvb6Q6RmwqTBfqqspu DfFmJZfPttcE0toyQlETl8UzGiJa6LHtbDHBSPqjVXk+pUNI2Y/6kkCAxJN39vO7XZex 75msqqFtxBszonXcvcp/ZJ7UPsPdyFdC7Cx0s/YKs+UNzgyZpNxY8ZgSwTlZTrvwHHNf o8xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=B2t28hcJ9F+/xHaYrx6BM84cA6mDN9ZeNQFhSsWLxJM=; fh=Mo/Lcs6WtjcRq1QaiJBjtYwS/87p5PpqCapK5ULE+Ko=; b=fzsfS8Z5GRSHXm8JxBdAYYbQ+JqpznRMKdu/+h0FJPiGyuQFKrawGyUk3ukABsPSnL J0BefRGHgsDfm5+zt7B8Yxt9YpDMpigxeNFfW4I+OMPOLeyRBcEwC/LXRUQSApuEzSRQ 0WQrzHeyYt9lYtTfXhqYmDUINjBHf1Aqlbjw2/o5wCjl5dkrPCjuYKwINWfku4XLX/l3 sZ6M/8vwiZ1w//HuOT42zvnZVgJ1NJyJg9ySUuswPTZEk/WQAFDErRL6qSLpMbmNKrBj CslwKiHtvaT8S/fMVifhMANj8V6LxR2BB+UKFxukJaQrKs5QMdY2YRhUfSiAtZJu100o 8ghQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd26-20020a056a00421a00b006817ac73c65si7938090pfb.156.2023.07.14.21.30.15; Fri, 14 Jul 2023 21:30:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230111AbjGODhC (ORCPT + 99 others); Fri, 14 Jul 2023 23:37:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjGODhA (ORCPT ); Fri, 14 Jul 2023 23:37:00 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BC6F19B4 for ; Fri, 14 Jul 2023 20:37:00 -0700 (PDT) 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771458182577668483 X-GMAIL-MSGID: 1771459501979940333 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,