Re: [PATCH RFC] introduce pm_call() macro to get rid of most #ifdef CONFIG_PM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!


> > > +/* avoid `defined but not used' warning */
> > > +#define pm_call(x) ((x) - 1 ? NULL : NULL)
> > > +#endif /* CONFIG_PM */
> > > +
> > 
> > This is evil.
> 
> Ugly, yes.  It might merit some casts too.
> 
> 
> > Maybe your gcc is smart enough to optimize this away, 
> > but I'm not sure mine is.
> 
> It'll be a constant expression; it certainly ought to be.

Well, we have just fooler compiler to think that x is used, and now we
want it to realize that x is unused and compile it out?

Maybe it is smart enough, but...
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux