[PATCH] ARM: Introduce HAVE_IOREAD_AND_IOWRITE macro.

Krzysztof Halasa khc at pm.waw.pl
Sat Nov 28 15:12:31 EST 2009


Russell King - ARM Linux <linux at arm.linux.org.uk> writes:

> Missed this.
>
> If you want to override a function, it's preferred to do it the way we're
> doing it.
>
> In otherwords, if you want to override a symbol using an inline function.
> Eg:
>
> #ifndef ndelay
> static inline void ndelay(unsigned long x)
> {
>         udelay(DIV_ROUND_UP(x, 1000));
> }
> #define ndelay(x) ndelay(x)
> #endif

I fear someone may want to remove this later thinking that
"#define a() a()" is not necessary.

Also we'd need to test each individual macro in the generic header since
we don't know if having ioread8 also means having other functions.

#ifndef ioread8
define ioread8()
#endif

#ifndef ioread16
define ioread16()
...

etc.

One self-explaining HAVE_IOREAD_AND_IOWRITE has no such problems.

But I can convert to these #ifndef ioread{8,16,etc} of course if you
wish. Please let me know if you want only ioread8 tested, or all of
them respectively.

What is important to me is that the IXP4xx functions are not called
__ixp4xx_something() if they do just the something() (instead of maybe
__raw_something() or __indirect_something()).

Thanks.
-- 
Krzysztof Halasa



More information about the linux-arm-kernel mailing list