2.6.22-rc2 built on ppc

Arnd Bergmann arnd at arndb.de
Mon May 21 02:49:28 EST 2007


On Sunday 20 May 2007, Stefan Richter wrote:
> I don't know what's to blame for the warnings --- new gcc versions or
> the change from do { } while (0) to ((void)0)?  Either way, the 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.

I think the best solution would be to replace the macros with
inline functions, so that the compiler can see them. This will
also give gcc the chance to do type checking on the arguments.

	Arnd <><



More information about the Linuxppc-dev mailing list