Messages in this thread | | | Date | Sun, 14 Jul 2013 17:32:32 -0700 | From | Greg Kroah-Hartman <> | Subject | Re: [PATCH v3 01/10] Driver core and sysfs changes for attribute groups |
| |
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@linuxfoundation.org> 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
| |