From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Bartosz Golaszewski <brgl@kernel.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Brendan Higgins <brendan.higgins@linux.dev>,
David Gow <david@davidgow.net>, Rae Moar <raemoar63@gmail.com>,
Andy Shevchenko <andy@kernel.org>,
driver-core@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com
Subject: Re: [PATCH v3 1/3] driver core: platform: remove software node on release()
Date: Tue, 28 Apr 2026 14:26:47 +0300 [thread overview]
Message-ID: <afCZdxFDC2N4D9il@ashevche-desk.local> (raw)
In-Reply-To: <CAMRc=Me4iPj84BdaqYRX5W-4XA1rCws8h4fe2jb=N+P9t7UMPg@mail.gmail.com>
On Tue, Apr 28, 2026 at 01:16:30PM +0200, Bartosz Golaszewski wrote:
> On Tue, Apr 28, 2026 at 1:10 PM Andy Shevchenko
> <andriy.shevchenko@intel.com> wrote:
> > On Tue, Apr 28, 2026 at 11:20:26AM +0200, Bartosz Golaszewski wrote:
...
> > > + device_remove_software_node(dev);
> > > of_node_put(pa->pdev.dev.of_node);
> >
> > So, why do we decide not to convert this to fwnode_handle_put() (and respective
> > _get() elsewhere)?
>
> Yes, I'll do it separately, I don't want to shove too much stuff into
> this bugfix.
Ah, good!
...
> > > + /*
> > > + * If the primary firmware node is a software node and there's no
> > > + * secondary firmware node, the primary will be affected by the call
> > > + * to device_remove_software_node() in platform_device_release() and
> > > + * its reference count will be dropped by one. Take another reference
> > > + * here to make it have no effect.
> > > + */
> > > + if (is_software_node(pdevinfo->fwnode) && !pdevinfo->swnode)
> > > + fwnode_handle_get(pdevinfo->fwnode);
> >
> > IIUC the `is_software_node(pdevinfo->fwnode) && pdevinfo->swnode` may not
> > happen here due to the above check. If I haven't missed anything, this check
> > is simply
>
> Right, it can be a simple is_software_node(pdevinfo->fwnode).
With that being addressed, the rest LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
(also assuming we will have at some point the above mentioned amendment).
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-04-28 11:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 9:20 [PATCH v3 0/3] driver core: remove software node from platform devices on device release Bartosz Golaszewski
2026-04-28 9:20 ` [PATCH v3 1/3] driver core: platform: remove software node on release() Bartosz Golaszewski
2026-04-28 11:10 ` Andy Shevchenko
2026-04-28 11:16 ` Bartosz Golaszewski
2026-04-28 11:26 ` Andy Shevchenko [this message]
2026-04-28 9:20 ` [PATCH v3 2/3] kunit: provide kunit_software_node_register() Bartosz Golaszewski
2026-04-28 9:20 ` [PATCH v3 3/3] driver core: platform: tests: add test cases for correct swnode removal Bartosz Golaszewski
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=afCZdxFDC2N4D9il@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brendan.higgins@linux.dev \
--cc=brgl@kernel.org \
--cc=dakr@kernel.org \
--cc=david@davidgow.net \
--cc=dmitry.torokhov@gmail.com \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=raemoar63@gmail.com \
--cc=rafael@kernel.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