From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh@kernel.org>,
Daniel Scally <djrscally@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH RFC net-next v5 10/10] net: gianfar: Use device_get_child_node_count_named()
Date: Mon, 3 Mar 2025 13:51:06 +0200 [thread overview]
Message-ID: <Z8WXqgxgFQC8b8vC@smile.fi.intel.com> (raw)
In-Reply-To: <685cd1affabe50af45b767eeed9b9002d006b0fd.1740993491.git.mazziesaccount@gmail.com>
On Mon, Mar 03, 2025 at 01:34:49PM +0200, Matti Vaittinen wrote:
> We can avoid open-coding the loop construct which counts firmware child
> nodes with a specific name by using the newly added
> device_get_child_node_count_named().
>
> The gianfar driver has such open-coded loop. Replace it with the
> device_get_child_node_count_named().
...
> It's fair to tell the pros and cons of this patch.
> The simplification is there, but it's not a big one. It comes with a cost
> of getting the property.h included in this driver which currently uses
> exclusively the of_* APIs.
I think it's a good step to the right direction. We might convert the rest
(at least I don't see much impediments while briefly looking into the code).
...
What about the second loop (in gfar_of_init)?
I mean perhaps we want to have fwnode_for_each_named_child_node()
and its device variant that may be also reused in the IIO code and here.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-03-03 11:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-03 11:30 [PATCH v5 00/10] Support ROHM BD79124 ADC Matti Vaittinen
2025-03-03 11:31 ` [PATCH v5 02/10] property: Add functions to count named child nodes Matti Vaittinen
2025-03-03 11:50 ` Heikki Krogerus
2025-03-03 12:00 ` Andy Shevchenko
2025-03-03 11:59 ` Andy Shevchenko
2025-03-10 6:23 ` Matti Vaittinen
2025-03-10 8:23 ` Andy Shevchenko
2025-03-03 11:32 ` [PATCH v5 03/10] iio: adc: add helpers for parsing ADC nodes Matti Vaittinen
2025-03-04 9:25 ` David Lechner
2025-03-04 12:07 ` Andy Shevchenko
2025-03-05 10:54 ` Matti Vaittinen
2025-03-08 16:29 ` Jonathan Cameron
2025-03-10 7:41 ` Matti Vaittinen
2025-03-10 19:25 ` Jonathan Cameron
2025-03-03 11:34 ` [PATCH v5 08/10] MAINTAINERS: Add IIO ADC helpers Matti Vaittinen
2025-03-03 11:34 ` [PATCH RFC net-next v5 10/10] net: gianfar: Use device_get_child_node_count_named() Matti Vaittinen
2025-03-03 11:51 ` Andy Shevchenko [this message]
2025-03-03 12:13 ` Matti Vaittinen
2025-03-03 12:24 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z8WXqgxgFQC8b8vC@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=dakr@kernel.org \
--cc=davem@davemloft.net \
--cc=djrscally@gmail.com \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jic23@kernel.org \
--cc=kuba@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=mazziesaccount@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox