Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3480158pxp; Tue, 8 Mar 2022 15:32:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVrk9sEhm3IPXNtsucFMeH8TEgFOWeJHOs0/Sd7jdGG16wDugqK0mcoMDYGukP5lTJTcBF X-Received: by 2002:a17:90a:6542:b0:1bd:149f:1c29 with SMTP id f2-20020a17090a654200b001bd149f1c29mr7281286pjs.240.1646782332786; Tue, 08 Mar 2022 15:32:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646782332; cv=none; d=google.com; s=arc-20160816; b=ZHcEBqzKuhInL5tCS3XMR5/J0pqYlyyaGxI211Op3h8qNV0GmYfsfVNHLDVm5prBwa AcOqlxkv7mrt/haNiD7mxUQUOpCRyEBxbngXTTjJ9KC4HRyi3MNKefwFIQZxr1Mt3dep sku1oz7NBBliJUdI/NtTvW5yN4DhVN76ybCEumd2PDLCLPaQsc7a2DPl8rg+nb0ap4iI hJZEf7RFN/3XLoJLo40xhJ/bP2YNDfB3z9A05R+nucXudPgY59H4sTm/99dpnnCnQ0Qp STwu+KKVnCjJN6bi2HHTfvuyQhI7yIzJq0H5PGsQGGAg4qsojozkhciwa45fIqCimvvA XVZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:comments:references:in-reply-to:subject:cc :to:from:dkim-signature; bh=k1EcgWYLYUAyFXD7zaCIFVTgmkFymkNTxJcCjb0ZEck=; b=YP0W6n/PzqHpT35YMsBoew6RaApQONgRv0k+TwRHvg98ORUynKmSIsH3rFFX13aTGE Khl+Pb4qaTX5RqoqNDa8mFvb51gbWAqvAKWdedF7zJJJUZ7CdJLGxS5BMpYfMYyRLczL izeXr+J11RELif/KUoFrrCh0zYGx3haQWx3pALeA57/ZWkQ4bq4CkMR7HtfRMnOxQJbr 1v5PVRvv8ijJj5QDOYL1+zHKtyGh8OjM4TsDU+me1N5VcfiA3QFdDJ0RK57N96+tVBrC DjSEbViumoY4SSlJaVCvs6FIhdPHp1g+72xzybC2rOsZalYP0S7wtPf+52idKzm55uz9 NV6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=lTd8nFUU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j4-20020a17090a734400b001bd14e03064si3386031pjs.60.2022.03.08.15.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 15:32:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=lTd8nFUU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 47CE3A9951; Tue, 8 Mar 2022 15:20:42 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350443AbiCHV0b (ORCPT + 99 others); Tue, 8 Mar 2022 16:26:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350236AbiCHV03 (ORCPT ); Tue, 8 Mar 2022 16:26:29 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91AAF5045D for ; Tue, 8 Mar 2022 13:25:31 -0800 (PST) Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id EDED23F1FC for ; Tue, 8 Mar 2022 21:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646774729; bh=k1EcgWYLYUAyFXD7zaCIFVTgmkFymkNTxJcCjb0ZEck=; h=From:To:cc:Subject:In-reply-to:References:MIME-Version: Content-Type:Date:Message-ID; b=lTd8nFUUmiWtrxG9Mnaxc/qrqGU3u1bhjirtM1rdUtIkcKc8fEfZb1Vs++byi8sxn NM6jNaAQ9DmhqVFQLhkpRGQdaBCs2NujbMIlOAgL+CBiQtDthLZCoyvfyYHPmjt9p7 I/llI5jbTpgPp6Lt9a5gq6igrddMqTbzNZilfJTpYC2NPRiPGV0aEWYeHISvx+Gp7q Pr/LKTjwAdf8TmYSCt4N2sXOUlFzWeC2eaKpqDb5vSZVVZF1DxnpoKW0XWVe2feJlI 8wA7aYO2sJ/dQxd1u+5DSGdXFvtHey3QnYFj22M7ahlnedgmA5krbKJzFjYjB20zKJ +bL5Cp9PskvgA== Received: by mail-pf1-f197.google.com with SMTP id w68-20020a62dd47000000b004f6aa5e4824so294135pff.4 for ; Tue, 08 Mar 2022 13:25:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :comments:mime-version:content-id:content-transfer-encoding:date :message-id; bh=k1EcgWYLYUAyFXD7zaCIFVTgmkFymkNTxJcCjb0ZEck=; b=TslepCGehbWZlOE6944RSTvYYEHoZ0YJETo8EWuVYps/UNRnK09P2nt6eojFwnP05N vCr42PIOLNd8wPs5qqyjcjwXXFiRviFbvfMCEei3lgsN4vTqCCJNB1mnHcNI8YlE8KEU MFGPpJiIMMrv5GuvBcHWae6smfCVK+zQPtreYz0AA+fFjuPHqN/38jWHOM7C6SNlZ0WE bLvZmAAdlWq5afvsmyChzgnjNRfDZgAMc79LjOFZINTchP4WpSpf80Utx1n9R0CGtAjg wjRSMql4nuIiQ5r+vR5MLN9fjVNfjKjbzRxnEoVYtVUhNiyRwrSrRe24svf2IZ+soivb p1fw== X-Gm-Message-State: AOAM5331pgUdnBA2lfgck5IYM/dJ1oRXIfh/1vcjjUkihAJdSvmsa5sp 6YkD+9D6istBrXU8UIEA1f4Xd+XqMm+Evb7XswpsIiw2ML7m5qJ3tyWnp7qWcstpiMR6ZQfpBgX uTlmA3M6AnG6yWcUdmX73VN1eZXfiar5QuRvXscsHyg== X-Received: by 2002:a17:90b:381:b0:1bf:50c7:a4e9 with SMTP id ga1-20020a17090b038100b001bf50c7a4e9mr900280pjb.239.1646774728498; Tue, 08 Mar 2022 13:25:28 -0800 (PST) X-Received: by 2002:a17:90b:381:b0:1bf:50c7:a4e9 with SMTP id ga1-20020a17090b038100b001bf50c7a4e9mr900252pjb.239.1646774728086; Tue, 08 Mar 2022 13:25:28 -0800 (PST) Received: from famine.localdomain ([50.125.80.157]) by smtp.gmail.com with ESMTPSA id l2-20020a056a0016c200b004e10af156adsm21415090pfc.190.2022.03.08.13.25.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Mar 2022 13:25:27 -0800 (PST) Received: by famine.localdomain (Postfix, from userid 1000) id 2682D60DD1; Tue, 8 Mar 2022 13:25:27 -0800 (PST) Received: from famine (localhost [127.0.0.1]) by famine.localdomain (Postfix) with ESMTP id 20FF19FAC3; Tue, 8 Mar 2022 13:25:27 -0800 (PST) From: Jay Vosburgh To: Lianjie Zhang cc: Jakub Kicinski , "David S. Miller" , Veaceslav Falico , Andy Gospodarek , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] bonding: helper macro __ATTR_RO to make code more clear In-reply-to: <20220307013333.15826-1-zhanglianjie@uniontech.com> References: <20220307013333.15826-1-zhanglianjie@uniontech.com> Comments: In-reply-to Lianjie Zhang message dated "Mon, 07 Mar 2022 09:33:33 +0800." X-Mailer: MH-E 8.6+git; nmh 1.6; Emacs 29.0.50 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2940.1646774727.1@famine> Content-Transfer-Encoding: quoted-printable Date: Tue, 08 Mar 2022 13:25:27 -0800 Message-ID: <2941.1646774727@famine> X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Lianjie Zhang wrote: >From: zhanglianjie > >Delete SLAVE_ATTR macro, use __ATTR_RO replacement, >make code logic clearer and unified. > >Signed-off-by: Lianjie Zhang >Reviewed-by: Jay Vosburgh Please do not add tags that individuals do not explicitly provide. Other than the above, the change seems fine. Acked-by: Jay Vosburgh -J >diff --git a/drivers/net/bonding/bond_sysfs_slave.c b/drivers/net/bonding= /bond_sysfs_slave.c >index 6a6cdd0bb258..69b0a3751dff 100644 >--- a/drivers/net/bonding/bond_sysfs_slave.c >+++ b/drivers/net/bonding/bond_sysfs_slave.c >@@ -15,14 +15,8 @@ struct slave_attribute { > ssize_t (*show)(struct slave *, char *); > }; > >-#define SLAVE_ATTR(_name, _mode, _show) \ >-const struct slave_attribute slave_attr_##_name =3D { \ >- .attr =3D {.name =3D __stringify(_name), \ >- .mode =3D _mode }, \ >- .show =3D _show, \ >-}; > #define SLAVE_ATTR_RO(_name) \ >- SLAVE_ATTR(_name, 0444, _name##_show) >+const struct slave_attribute slave_attr_##_name =3D __ATTR_RO(_name) > > static ssize_t state_show(struct slave *slave, char *buf) > { >-- >2.20.1 --- -Jay Vosburgh, jay.vosburgh@canonical.com