[RFC/PATCH 2/12] powerpc: Remove #ifdef ISERIES from __raw_* accessors in io.h
Arnd Bergmann
arnd at arndb.de
Tue Jan 17 21:38:46 EST 2006
On Tuesday 17 January 2006 05:59, David Gibson wrote:
> > +static inline unsigned char __raw_readb(const volatile void __iomem *addr)
> > +{
> > + if (firmware_has_feature(FW_FEATURE_ISERIES))
> > + BUG(); /* raw accessors aren't supported on iSeries
> > */
>
> BUG_ON() would seem reasonable here..
>
Actually, I think not. The result of
firmware_has_features(FW_FEATURE_ISERIES) should normally be
a compile-time constant, so the BUG code gets optimized away.
If you do BUG_ON(), you force the compiler to emit the code for
that anyway, even if it never causes any action to be taken.
Arnd <><
More information about the Linuxppc64-dev
mailing list