Re: [PATCH v3 01/10] Driver core and sysfs changes for attributegroups

From: Greg Kroah-Hartman
Date: Sun Jul 14 2013 - 20:31:37 EST


On Mon, Jul 15, 2013 at 10:27:00AM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> On Sun, 14 Jul 2013 16:05:50 -0700 Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > Anyone else have a better name for this macro:
> > #define DEVICE_PATTR(_name) &dev_attr_##_name.attr
> > that they can think of? It will cut down on the typing done for
> > attribute lists.
>
> Just one small peeve I have about all these places we do symbol pasting,
> is that it makes it impossible to find some things because grep complete
> fails us. We type them once (often by cutting and pasting), but try to
> find them who knows how many times?
>
> Just saying ...

Yeah, I know. But realize that the dev_attr_##_name variable was
originally created with a:
DEV_ATTR_RO(sysfs_file_name);
macro in the first place, so even trying to grep for dev_attr* brings up
nothing. At least this way the grep would find the same thing, so it
does make a little bit sense in a way, right?

Or am I just trying to justify it as I'm tired of typing all that...

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/