From: Jonathan Cameron <jic23@kernel.org>
To: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Michael Hennerich <Michael.Hennerich@analog.com>,
linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 0/4] iio: adc: use scoped device_for_each_childe_node()
Date: Sat, 28 Sep 2024 17:29:44 +0100 [thread overview]
Message-ID: <20240928172944.10da3b60@jic23-huawei> (raw)
In-Reply-To: <20240926-iio_device_for_each_child_node_scoped-v1-0-64ca8a424578@gmail.com>
On Thu, 26 Sep 2024 18:08:36 +0200
Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:
> The device_for_each_child_node() macro requires calls to
> fwnode_handle_put() upon early exits (break/return), and that has been a
> constant source of bugs in the kernel.
>
> This series switches to the more secure, scoped version of the macro
> in the IIO subsystem, wherever the loop contains error paths. This
> change simplifies the code and removes the explicit calls to
> fwnode_handle_put(). In all cases the child node is only used for
> parsing, and not assigned to be used later.
>
> The straightforward uses of the loop with no error paths have been left
> untouched, as their simplicity justifies the non-scoped variant.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
All look good to me.
I'll be rebasing on rc1 anyway, so there is plenty of time for any
other reviews to come in. In meantime I've queued these up on the testing
branch of iio.git.
Thanks,
Jonathan
> ---
> Javier Carrasco (4):
> iio: adc: qcom-pm8xxx-xoadc: use scoped device_for_each_child_node()
> iio: adc: qcom-spmi-vadc: use scoped device_for_each_child_node()
> iio: adc: sun20i-gpadc: use scoped device_for_each_child_node()
> iio: adc: ad5755: use scoped device_for_each_child_node()
>
> drivers/iio/adc/qcom-pm8xxx-xoadc.c | 8 +++-----
> drivers/iio/adc/qcom-spmi-vadc.c | 7 ++-----
> drivers/iio/adc/sun20i-gpadc-iio.c | 7 ++-----
> drivers/iio/dac/ad5755.c | 11 +++--------
> 4 files changed, 10 insertions(+), 23 deletions(-)
> ---
> base-commit: 92fc9636d1471b7f68bfee70c776f7f77e747b97
> change-id: 20240926-iio_device_for_each_child_node_scoped-cb534e6f5d9b
>
> Best regards,
prev parent reply other threads:[~2024-09-28 16:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 16:08 [PATCH 0/4] iio: adc: use scoped device_for_each_childe_node() Javier Carrasco
2024-09-26 16:08 ` [PATCH 1/4] iio: adc: qcom-pm8xxx-xoadc: use scoped device_for_each_child_node() Javier Carrasco
2024-09-26 16:08 ` [PATCH 2/4] iio: adc: qcom-spmi-vadc: " Javier Carrasco
2024-09-26 16:08 ` [PATCH 3/4] iio: adc: sun20i-gpadc: " Javier Carrasco
2024-09-26 16:48 ` Chen-Yu Tsai
2024-09-26 16:08 ` [PATCH 4/4] iio: adc: ad5755: " Javier Carrasco
2024-09-28 16:29 ` Jonathan Cameron [this message]
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=20240928172944.10da3b60@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=wens@csie.org \
/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