LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@ozlabs.org, linux1394-devel@lists.sourceforge.net,
	Stefan Richter <stefanr@s5r6.in-berlin.de>,
	Elimar Riesebieter <riesebie@lxtec.de>,
	ben.collins@ubuntu.com
Subject: Re: 2.6.22-rc2 built on ppc
Date: Sun, 20 May 2007 20:19:10 +0200	[thread overview]
Message-ID: <8c9e6fe68260187606a8ad7f402a4fd8@kernel.crashing.org> (raw)
In-Reply-To: <200705201849.29805.arnd@arndb.de>

>> I don't know what's to blame for the warnings --- new gcc versions or
>> the change from do { } while (0) to ((void)0)? =A0Either way, the=20
>> compiler
>> should comprehend that the arguments stuffed into the =
dma_unmap_single
>> macro are _not_ unused by accident; it should stay quiet and optimize
>> the unused variables away if run with -Osomething.
>
> There is not much that the compiler can do by itself, since the macro
> expansion happens in the preprocessor.

Even if the compiler could see that the variables are
used as macro arguments, this doesn't automatically
equate to it being able to infer the variables are
unused on purpose.

> I think the best solution would be to replace the macros with
> inline functions, so that the compiler can see them.

This should shut up the warnings, yes...

> This will
> also give gcc the chance to do type checking on the arguments.

...and it is a good idea no matter what.


Segher

  reply	other threads:[~2007-05-20 18:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070520112904.GM3253@aragorn.home.lxtec.de>
2007-05-20 15:53 ` 2.6.22-rc2 built on ppc Stefan Richter
2007-05-20 16:01   ` Stefan Richter
2007-05-20 16:49   ` Arnd Bergmann
2007-05-20 18:19     ` Segher Boessenkool [this message]
2007-05-20 18:40       ` Stefan Richter
2007-05-20 20:39         ` Geert Uytterhoeven
2007-05-20 11:30 Elimar Riesebieter

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=8c9e6fe68260187606a8ad7f402a4fd8@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=arnd@arndb.de \
    --cc=ben.collins@ubuntu.com \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=riesebie@lxtec.de \
    --cc=stefanr@s5r6.in-berlin.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox