lkml.org 
[lkml]   [2020]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] software node: recursively unregister child swnodes
From
Date


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

\
 
 \ /
  Last update: 2020-06-05 18:21    [W:0.073 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site