From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-iio <linux-iio@vger.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
linux-amlogic <linux-amlogic@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: [PATCH v2 3/3] iio: adc: meson_saradc: Use temporary variable for struct device
Date: Thu, 2 Jun 2022 15:45:27 +0200 [thread overview]
Message-ID: <CAHp75VcSFr+E7_woyw6jx7e9wCeFUUouV_7xJXYO26_y6=fwTQ@mail.gmail.com> (raw)
In-Reply-To: <ad3af033-97f1-3aad-d082-c6ed56185b59@metafoo.de>
On Thu, Jun 2, 2022 at 2:08 PM Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 6/2/22 13:42, Andy Shevchenko wrote:
...
> > - priv->adc_clk = devm_clk_register(&indio_dev->dev, &priv->clk_gate.hw);
> > + priv->adc_clk = devm_clk_register(idev, &priv->clk_gate.hw);
>
> You are not changing anything here.
The scope of patch is supposed not to change the current behaviour :-)
> But we shouldn't be devm'ing on the
> IIO device. It will get freed eventually, but only when the last
> reference to the iio device has been dropped, which might be long after
> the platform device has been removed. devm'ing should happen on the
> platform_device's device. Might be worth fixing.
Thanks for confirming my suspicions (as I mentioned to Martin, using
an IIO device there feels wrong).
I will add another patch to v3.
--
With Best Regards,
Andy Shevchenko
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-iio <linux-iio@vger.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
linux-amlogic <linux-amlogic@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: [PATCH v2 3/3] iio: adc: meson_saradc: Use temporary variable for struct device
Date: Thu, 2 Jun 2022 15:45:27 +0200 [thread overview]
Message-ID: <CAHp75VcSFr+E7_woyw6jx7e9wCeFUUouV_7xJXYO26_y6=fwTQ@mail.gmail.com> (raw)
In-Reply-To: <ad3af033-97f1-3aad-d082-c6ed56185b59@metafoo.de>
On Thu, Jun 2, 2022 at 2:08 PM Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 6/2/22 13:42, Andy Shevchenko wrote:
...
> > - priv->adc_clk = devm_clk_register(&indio_dev->dev, &priv->clk_gate.hw);
> > + priv->adc_clk = devm_clk_register(idev, &priv->clk_gate.hw);
>
> You are not changing anything here.
The scope of patch is supposed not to change the current behaviour :-)
> But we shouldn't be devm'ing on the
> IIO device. It will get freed eventually, but only when the last
> reference to the iio device has been dropped, which might be long after
> the platform device has been removed. devm'ing should happen on the
> platform_device's device. Might be worth fixing.
Thanks for confirming my suspicions (as I mentioned to Martin, using
an IIO device there feels wrong).
I will add another patch to v3.
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-iio <linux-iio@vger.kernel.org>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
linux-amlogic <linux-amlogic@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: [PATCH v2 3/3] iio: adc: meson_saradc: Use temporary variable for struct device
Date: Thu, 2 Jun 2022 15:45:27 +0200 [thread overview]
Message-ID: <CAHp75VcSFr+E7_woyw6jx7e9wCeFUUouV_7xJXYO26_y6=fwTQ@mail.gmail.com> (raw)
In-Reply-To: <ad3af033-97f1-3aad-d082-c6ed56185b59@metafoo.de>
On Thu, Jun 2, 2022 at 2:08 PM Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 6/2/22 13:42, Andy Shevchenko wrote:
...
> > - priv->adc_clk = devm_clk_register(&indio_dev->dev, &priv->clk_gate.hw);
> > + priv->adc_clk = devm_clk_register(idev, &priv->clk_gate.hw);
>
> You are not changing anything here.
The scope of patch is supposed not to change the current behaviour :-)
> But we shouldn't be devm'ing on the
> IIO device. It will get freed eventually, but only when the last
> reference to the iio device has been dropped, which might be long after
> the platform device has been removed. devm'ing should happen on the
> platform_device's device. Might be worth fixing.
Thanks for confirming my suspicions (as I mentioned to Martin, using
an IIO device there feels wrong).
I will add another patch to v3.
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2022-06-02 13:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 11:42 [PATCH v2 1/3] iio: adc: meson_saradc: Convert to use dev_err_probe() Andy Shevchenko
2022-06-02 11:42 ` Andy Shevchenko
2022-06-02 11:42 ` Andy Shevchenko
2022-06-02 11:42 ` [PATCH v2 2/3] iio: adc: meson_saradc: Use devm_clk_get_optional() Andy Shevchenko
2022-06-02 11:42 ` Andy Shevchenko
2022-06-02 11:42 ` Andy Shevchenko
2022-06-02 11:42 ` [PATCH v2 3/3] iio: adc: meson_saradc: Use temporary variable for struct device Andy Shevchenko
2022-06-02 11:42 ` Andy Shevchenko
2022-06-02 11:42 ` Andy Shevchenko
2022-06-02 11:53 ` Lars-Peter Clausen
2022-06-02 11:53 ` Lars-Peter Clausen
2022-06-02 11:53 ` Lars-Peter Clausen
2022-06-02 13:45 ` Andy Shevchenko [this message]
2022-06-02 13:45 ` Andy Shevchenko
2022-06-02 13:45 ` Andy Shevchenko
2022-06-03 16:18 ` Jonathan Cameron
2022-06-03 16:18 ` Jonathan Cameron
2022-06-03 16:18 ` Jonathan Cameron
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='CAHp75VcSFr+E7_woyw6jx7e9wCeFUUouV_7xJXYO26_y6=fwTQ@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jbrunet@baylibre.com \
--cc=jic23@kernel.org \
--cc=khilman@baylibre.com \
--cc=lars@metafoo.de \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.