Re: [RFC] New kobject/kset/ktype documentation and example code

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Alan Stern <stern@...>
Cc: Greg KH <greg@...>, Kernel development list <linux-kernel@...>, Jonathan Corbet <corbet@...>, Randy Dunlap <randy.dunlap@...>, Cornelia Huck <cornelia.huck@...>
Date: Wednesday, November 28, 2007 - 3:28 pm

On Wed, 2007-11-28 at 14:03 -0500, Alan Stern wrote:

Yeah, it's a kind of convenience that causes far more problems than is
solves. Kobjects are low-level and we depend entirely on proper events
today, so I vote for removal of all the *register* crap.


Ksets are optional, yes. Ktypes are required for releasing the object,
so we should say they are mandatory.


Yes, it's an important point.


We just require the ktype.


It all depends on the parent pointer, and I think we have far more kobjects
no showing up at the kset like all devices belong to the devices_kset but
only one or two show up directly in the kset directory, all the other are
just childs.


"If the kobject belonging to a kset has no parent kobject set, it will
be added to the kset's directory. Not all members of a kset do
necessarily live in the kset directory. If an explicit parent kobject is
assigned before the kobject is added, the kobject is registered with the
kset, but added below the parent kobject."


It does not matter anymore to assign the values before kobject_init(),
but we should mention, that we require a ktype before we add the object.


Right, that looks not too useful.

Kay

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC] New kobject/kset/ktype documentation and example c..., Kay Sievers, (Wed Nov 28, 3:28 pm)
kobject_init rewrite, Greg KH, (Thu Nov 29, 5:53 pm)
Re: kobject_init rewrite, Alan Stern, (Thu Nov 29, 6:16 pm)
Re: kobject_init rewrite, Greg KH, (Thu Nov 29, 6:24 pm)
Re: kobject_init rewrite, Greg KH, (Thu Nov 29, 5:54 pm)
Re: kobject_init rewrite, Cornelia Huck, (Fri Nov 30, 5:31 am)
[RFC] Sample kset/ktype/kobject implementation, Greg KH, (Tue Nov 27, 7:04 pm)
Re: [RFC] Sample kset/ktype/kobject implementation, Cornelia Huck, (Wed Nov 28, 12:35 pm)
Re: [RFC] Sample kset/ktype/kobject implementation, Cornelia Huck, (Thu Nov 29, 5:39 am)
Re: [RFC] Sample kset/ktype/kobject implementation, Alan Stern, (Thu Nov 29, 6:11 pm)
Re: [RFC] Sample kset/ktype/kobject implementation, Dave Young, (Fri Nov 30, 1:07 am)
Re: [RFC] Sample kset/ktype/kobject implementation, Alan Stern, (Fri Nov 30, 10:51 am)
Re: [RFC] Sample kset/ktype/kobject implementation, Dave Young, (Fri Nov 30, 1:57 am)
[RFC] sample kobject implementation, Greg KH, (Tue Nov 27, 7:03 pm)