From mboxrd@z Thu Jan 1 00:00:00 1970 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 32489C7EE23 for ; Tue, 30 May 2023 06:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbjE3GMO (ORCPT ); Tue, 30 May 2023 02:12:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbjE3GMN (ORCPT ); Tue, 30 May 2023 02:12:13 -0400 Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3594ACD; Mon, 29 May 2023 23:12:09 -0700 (PDT) X-QQ-mid: Yeas53t1685427069t065t27383 Received: from 3DB253DBDE8942B29385B9DFB0B7E889 (jiawenwu@trustnetic.com [183.159.96.128]) X-QQ-SSF: 00400000000000F0FOF000000000000 From: =?utf-8?b?Smlhd2VuIFd1?= X-BIZMAIL-ID: 12025745897829443806 To: "'Andy Shevchenko'" , "'Hans de Goede'" Cc: , , , , , , , , , , , "'Piotr Raczynski'" References: <20230524091722.522118-1-jiawenwu@trustnetic.com> <20230524091722.522118-2-jiawenwu@trustnetic.com> In-Reply-To: Subject: RE: [PATCH net-next v9 1/9] net: txgbe: Add software nodes to support phylink Date: Tue, 30 May 2023 14:11:08 +0800 Message-ID: <038901d992bd$863a6b30$92af4190$@trustnetic.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIrQcdiCo7tNEhbaUMwQ6r5o07FvQMfMz0nAm3dY9Ouoo2ZQA== Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:trustnetic.com:qybglogicsvrgz:qybglogicsvrgz5a-1 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org On Saturday, May 27, 2023 4:44 PM, Andy Shevchenko wrote: > +Cc Hans (see below) > > On Wed, May 24, 2023 at 05:17:14PM +0800, Jiawen Wu wrote: > > Register software nodes for GPIO, I2C, SFP and PHYLINK. Define the > > device properties. > > ... > > > +int txgbe_init_phy(struct txgbe *txgbe) > > +{ > > + int ret; > > + > > + ret = txgbe_swnodes_register(txgbe); > > + if (ret) { > > + wx_err(txgbe->wx, "failed to register software nodes\n"); > > > + return ret; > > + } > > + > > + return 0; > > These 4 lines can be as simple as > > return ret; This function is going to be extended with later patches, is it necessary to simply it here? > > > +} > > ... > > > +#define NODE_PROP(_NAME, _PROP) \ > > + (const struct software_node) { \ > > + .name = _NAME, \ > > + .properties = _PROP, \ > > + } > > Looking at the amount of drivers that want this, I would declare it in the > property.h with SOFTWARE_NODE_PROPERTY name. I'll Ack that. > > Hans, what do you think?