lkml.org 
[lkml]   [2008]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] regulator: regulator core.
On Sun, Feb 24, 2008 at 10:23:49AM +0000, Mark Brown wrote:
> On Sat, Feb 23, 2008 at 09:52:17AM +0000, Russell King - ARM Linux wrote:
> > On Sat, Feb 23, 2008 at 12:05:38AM -0800, Andrew Morton wrote:
>
> > > > +#undef current
>
> > > err, no ;) Please rename your stuff.
>
> > Renaming is not an option - "current" is an electronic term for which
> > there is no alternative. The real problem is this __ATTR macro crap:
>
> Indeed, and this is already being worked around by
> drivers/power/power_supply_sysfs.c:
>
> #define POWER_SUPPLY_ATTR(_name) \
> { \
> .attr = { .name = #_name, .mode = 0444, .owner = THIS_MODULE }, \

My argument is - why bother with stuff like this, why not just pass
"_name" as the string itself, rather than using the preprocessor to
turn symbols into strings thereby suffering these nasty interactions.

It's not like "_name" is used for anything other than generating a
string.


\
 
 \ /
  Last update: 2008-02-24 23:27    [W:0.160 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site