linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jordan Hand <jorhand@linux.microsoft.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	linux-kernel@vger.kernel.org, linux-next@vger.kernel.org
Subject: Re: [PATCH] software node: recursively unregister child swnodes
Date: Fri, 5 Jun 2020 09:20:06 -0700	[thread overview]
Message-ID: <d8552b13-dbbb-7e4b-9e56-3264435d9225@linux.microsoft.com> (raw)
In-Reply-To: <20200605075459.GB2209311@kroah.com>



On 6/5/20 12:54 AM, Greg Kroah-Hartman wrote:
> Right now, the way the driver model and sysfs/kobjects work is that all
> objects must be removed in child-first order.  The problem of your
> change where you want to try to remove the devices in parent-first order
> is that you do not really know if you still have a reference to a child
> device somewhere else, which would prevent this all from happening
> correctly, right?
> 
> So if you "know" it is safe to drop a child, that's great, and expected.
> Don't work to make  this one tiny user of the kobjects (which I'm still
> not quite sure why they are kobjects and not devices), do things in a
> different way from the rest of the kernel without a strong reason to do
> so.
> 
> thanks,
> 
> greg k-h
> 

I see, thanks for taking the time to explain, the reason for the 
existing behavior is more clear to me now. I agree it is better to have 
the caller remove the nodes in the correct order rather than having the 
swnode infrastructure try to have some special behavior.

Thanks,
Jordan

      reply	other threads:[~2020-06-05 16:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04 19:36 [PATCH] software node: recursively unregister child swnodes jorhand
2020-06-04 20:15 ` Greg Kroah-Hartman
2020-06-04 20:57   ` Jordan Hand
2020-06-04 23:28     ` Jordan Hand
2020-06-05  7:54     ` Greg Kroah-Hartman
2020-06-05 16:20       ` Jordan Hand [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=d8552b13-dbbb-7e4b-9e56-3264435d9225@linux.microsoft.com \
    --to=jorhand@linux.microsoft.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).