[linux-pm] [PATCH RFC] introduce pm_call() macro to get rid of most #ifdef CONFIG_PM
David Brownell
david-b at pacbell.net
Mon Mar 3 14:56:38 PST 2008
On Monday 03 March 2008, Pavel Machek wrote:
> > +/* 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.
More information about the linux-pm
mailing list