From nobody Thu Jun 25 09:39:43 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FA21C433EF for ; Tue, 22 Feb 2022 11:21:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231666AbiBVLVt (ORCPT ); Tue, 22 Feb 2022 06:21:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230352AbiBVLVr (ORCPT ); Tue, 22 Feb 2022 06:21:47 -0500 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D218CEA2D for ; Tue, 22 Feb 2022 03:21:20 -0800 (PST) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4K2xV84YfSz9sBC; Tue, 22 Feb 2022 19:17:52 +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:21:18 +0800 From: Miaohe Lin To: CC: , Subject: [PATCH] kernel/ksysfs.c: use helper macro __ATTR_RW Date: Tue, 22 Feb 2022 19:20:34 +0800 Message-ID: <20220222112034.48298-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Use helper macro __ATTR_RW to define kobj_attribute to make code more clear. Minor readability improvement. Signed-off-by: Miaohe Lin --- kernel/ksysfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c index 35859da8bd4f..b1292a57c2a5 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c @@ -24,8 +24,7 @@ static struct kobj_attribute _name##_attr =3D __ATTR_RO(_name) =20 #define KERNEL_ATTR_RW(_name) \ -static struct kobj_attribute _name##_attr =3D \ - __ATTR(_name, 0644, _name##_show, _name##_store) +static struct kobj_attribute _name##_attr =3D __ATTR_RW(_name) =20 /* current uevent sequence number */ static ssize_t uevent_seqnum_show(struct kobject *kobj, --=20 2.23.0