Re: [RFC] New kobject/kset/ktype documentation and example code
From: Greg KH
Date: Thu Nov 29 2007 - 01:09:28 EST
On Wed, Nov 28, 2007 at 12:45:45PM +0100, Cornelia Huck wrote:
> On Tue, 27 Nov 2007 15:02:52 -0800,
> Greg KH <greg@xxxxxxxxx> wrote:
> > - A kset can provide a set of default attributes that all kobjects that
> > belong to it automatically inherit and have created whenever a kobject
> > is registered belonging to the kset.
>
> Hm, the default attributes are provided by the ktype?
Yes, now fixed.
> > The uevent function will be called when the uevent is about to be sent to
> > userspace to allow more environment variables to be added to the uevent.
>
> It may be helpful to mention which uevents are by default created by
> the kobject core (KOBJ_ADD, KOBJ_DEL, KOBJ_MOVE).
Is this really needed?
> > - refcount is the kobject's reference count; it is initialized by kobject_init()
>
> There is no field called "refcount"; the embedded struct kref kref is
> initialized by kobject_init().
now removed, thanks.
> > Often, much of the initialization of a kobject is handled by the layer that
> > manages the containing kset. See the sample/kobject/kset-example.c for how
> > this is usually handled.
>
> Do we also want to mention kobject_rename() and kobject_move(), or are
> those functions so esoteric that most people don't want to know about
> them?
They can be found in the kerneldoc api reference if they are needed :)
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/