From: Johan Hovold <johan@kernel.org>
To: Bartosz Golaszewski <brgl@kernel.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
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>,
Linus Walleij <linusw@kernel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
linux-acpi@vger.kernel.org, driver-core@lists.linux.dev,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] software node: make swnodes hold their own references on parents
Date: Tue, 17 Nov 2026 14:47:06 +0100 [thread overview]
Message-ID: <avxa2k9HyHX9CvYl@hovoldconsulting.com> (raw)
In-Reply-To: <k3yo7tpvb33prcuuw2a2qthvuww2edb7tsszj5hxlkcfaurt7k@m2czeig46clb>
On Tue, Nov 17, 2026 at 02:39:27PM +0100, Bartosz Golaszewski wrote:
> On Tue, Nov 17, 2026 at 01:10:02PM +0100, Johan Hovold wrote:
> > On Fri, Nov 06, 2026 at 12:13:28PM +0100, Bartosz Golaszewski wrote:
> > > @@ -843,11 +843,12 @@ static void software_node_free(const struct software_node *node)
> > > static void software_node_release(struct kobject *kobj)
> > > {
> > > struct swnode *swnode = kobj_to_swnode(kobj);
> > > + struct swnode *parent = swnode->parent;
> > >
> > > fwnode_links_purge(&swnode->fwnode);
> > >
> > > - if (swnode->parent) {
> > > - ida_free(&swnode->parent->child_ids, swnode->id);
> > > + if (parent) {
> > > + ida_free(&parent->child_ids, swnode->id);
> > > list_del(&swnode->entry);
> >
> > Why not simply
> >
> > swnode_put(swnode->parent);
> >
> > here?
> >
>
> Because swnode_put() doesn't accept NULL. I have it on my TODO list to
> add it but this is a fix, so I want to keep it minimal.
swnode->parent is not NULL here in the conditional block.
Johan
prev parent reply other threads:[~2026-11-17 13:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 11:13 [PATCH] software node: make swnodes hold their own references on parents Bartosz Golaszewski
2026-11-09 19:52 ` Andy Shevchenko
2026-11-10 8:57 ` Bartosz Golaszewski
2026-11-17 12:10 ` Johan Hovold
2026-11-17 13:39 ` Bartosz Golaszewski
2026-11-17 13:47 ` Johan Hovold [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=avxa2k9HyHX9CvYl@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=dakr@kernel.org \
--cc=djrscally@gmail.com \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linusw@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@vger.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