From: Pavel Machek <pavel@ucw.cz>
To: David Brownell <david-b@pacbell.net>
Cc: linux-pm@lists.linux-foundation.org,
Anton Vorontsov <cbouatmailru@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [linux-pm] [PATCH RFC] introduce pm_call() macro to get rid of most #ifdef CONFIG_PM
Date: Tue, 4 Mar 2008 00:16:43 +0100 [thread overview]
Message-ID: <20080303231643.GL13869@elf.ucw.cz> (raw)
In-Reply-To: <200803031456.38406.david-b@pacbell.net>
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
next prev parent reply other threads:[~2008-03-03 23:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-02 23:43 [PATCH RFC] introduce pm_call() macro to get rid of most #ifdef CONFIG_PM Anton Vorontsov
2008-03-03 0:08 ` Arjan van de Ven
2008-03-03 0:29 ` Rafael J. Wysocki
2008-03-03 0:29 ` Rafael J. Wysocki
2008-03-03 23:26 ` Anton Vorontsov
2008-03-03 23:26 ` Anton Vorontsov
2008-03-03 0:08 ` Arjan van de Ven
2008-03-03 14:18 ` Pavel Machek
2008-03-03 22:42 ` Anton Vorontsov
2008-03-03 22:42 ` Anton Vorontsov
2008-03-03 22:56 ` David Brownell
2008-03-03 22:56 ` [linux-pm] " David Brownell
2008-03-03 23:16 ` Pavel Machek
2008-03-03 23:16 ` Pavel Machek [this message]
2008-03-03 14:18 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080303231643.GL13869@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=cbouatmailru@gmail.com \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.