lkml.org 
[lkml]   [2019]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kobject: Add support for default attribute groups to kobj_type
On Sat, Mar 23, 2019 at 11:48:21PM -0400, Kimberly Brown wrote:
> On Sat, Mar 23, 2019 at 07:07:37AM +0100, Greg Kroah-Hartman wrote:
> > On Fri, Mar 22, 2019 at 04:14:40PM -0400, Kimberly Brown wrote:
> > > kobj_type currently uses a list of individual attributes to store
> > > default attributes. Attribute groups are more flexible than a list of
> > > attributes because groups provide support for attribute visibility. So,
> > > add support for default attribute groups to kobj_type.
> > >
> > > In future patches, the existing uses of kobj_type’s attribute list will
> > > be converted to attribute groups. When that is complete, kobj_type’s
> > > attribute list, “default_attrs”, will be removed.
> > >
> > > Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
> > > ---
> > > include/linux/kobject.h | 3 ++-
> > > lib/kobject.c | 14 ++++++++++++++
> > > 2 files changed, 16 insertions(+), 1 deletion(-)
> >
> > Yes! Thanks for doing this.
> >
> > But how did you test it? Did you convert any kobj_type structures to
> > the attribute group and see that all was the same? Ideally I'd like to
> > take this patch with at least one subsystem that uses the change,
> > otherwise this looks like unused code in the kernel.
>
> Yes, I tested it by converting a couple of kobj_type structures,
> including one that I recently added an is_visible() function to
> (vmbus_chan_ktype in the hv_vmbus driver).
>
> I'll put together a patchset with this patch and at least one
> subsystem's changes.

Wonderful, I'll wait to take this when you send that series.

thanks,

greg k-h

\
 
 \ /
  Last update: 2019-03-24 06:16    [W:0.051 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site