From nobody Mon Feb 9 11:07:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=quarantine dis=quarantine) header.from=huawei.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1645528427635724.6050877333165; Tue, 22 Feb 2022 03:13:47 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.276697.472946 (Exim 4.92) (envelope-from ) id 1nMT6i-0006SJ-TW; Tue, 22 Feb 2022 11:13:24 +0000 Received: by outflank-mailman (output) from mailman id 276697.472946; Tue, 22 Feb 2022 11:13:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nMT6i-0006SC-PI; Tue, 22 Feb 2022 11:13:24 +0000 Received: by outflank-mailman (input) for mailman id 276697; Tue, 22 Feb 2022 11:13:23 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nMT6h-0006S4-Lq for xen-devel@lists.xenproject.org; Tue, 22 Feb 2022 11:13:23 +0000 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6f85945c-93d0-11ec-8eb8-a37418f5ba1a; Tue, 22 Feb 2022 12:13:19 +0100 (CET) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4K2xLr5zVwz9sxm; Tue, 22 Feb 2022 19:11:32 +0800 (CST) Received: from huawei.com (10.175.124.27) 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.2308.21; Tue, 22 Feb 2022 19:13:15 +0800 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6f85945c-93d0-11ec-8eb8-a37418f5ba1a From: Miaohe Lin To: , CC: , , , Subject: [PATCH] xen: use helper macro __ATTR_RW Date: Tue, 22 Feb 2022 19:12:22 +0800 Message-ID: <20220222111222.56877-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-ZM-MESSAGEID: 1645528428419100001 Content-Type: text/plain; charset="utf-8" Use helper macro __ATTR_RW to define hyp_sysfs_attr to make code more clear. Minor readability improvement. Signed-off-by: Miaohe Lin Reviewed-by: Juergen Gross --- drivers/xen/sys-hypervisor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c index feb1d16252e7..5e842c88a13e 100644 --- a/drivers/xen/sys-hypervisor.c +++ b/drivers/xen/sys-hypervisor.c @@ -25,8 +25,7 @@ static struct hyp_sysfs_attr _name##_attr =3D __ATTR_RO(_name) =20 #define HYPERVISOR_ATTR_RW(_name) \ -static struct hyp_sysfs_attr _name##_attr =3D \ - __ATTR(_name, 0644, _name##_show, _name##_store) +static struct hyp_sysfs_attr _name##_attr =3D __ATTR_RW(_name) =20 struct hyp_sysfs_attr { struct attribute attr; --=20 2.23.0