* [PATCH] s3c2410: remove __ioaddrc()
@ 2011-10-29 19:32 Cesar Eduardo Barros
2011-10-31 10:11 ` Russell King - ARM Linux
0 siblings, 1 reply; 2+ messages in thread
From: Cesar Eduardo Barros @ 2011-10-29 19:32 UTC (permalink / raw)
To: linux-arm-kernel
While looking at s3c2410's mach/io.h, I noticed the #define for
__ioaddr() looked wrong. While the #defines above it called the "c"
suffixed variant when __builtin_constant_p() was true, the one for
__ioaddr() called the "c" suffixed variant (__ioaddrc()) when
__builtin_constant_p() was *false*.
Looking further, I noticed that __ioaddr() and __ioaddrc() were
identical, the only difference being that __ioaddr() is an inline
function and __ioaddrc() is a macro.
__ioaddrc() is not used anywhere else. There were similar constructs,
also reversed from what I'd expect, in both mach-clps7500 (removed from
the kernel in 2.6.29) and mach-rpc. The copy in mach-rpc was removed in
commit 6de2c31d3dad7384b3efa03674bd6ed479d58cb2 (rpc: remove obsolete IO
accessors).
Since __ioaddrc() is both redundant and useless, has no other uses, and
has already been removed in mach-rpc, remove it also in mach-s3c2410.
Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
---
arch/arm/mach-s3c2410/include/mach/io.h | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-s3c2410/include/mach/io.h b/arch/arm/mach-s3c2410/include/mach/io.h
index 118749f..5843974 100644
--- a/arch/arm/mach-s3c2410/include/mach/io.h
+++ b/arch/arm/mach-s3c2410/include/mach/io.h
@@ -190,15 +190,12 @@ DECLARE_IO(int,l,"")
result; \
})
-#define __ioaddrc(port) ((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)(port)))
-
#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
-#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
--
1.7.6.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] s3c2410: remove __ioaddrc()
2011-10-29 19:32 [PATCH] s3c2410: remove __ioaddrc() Cesar Eduardo Barros
@ 2011-10-31 10:11 ` Russell King - ARM Linux
0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2011-10-31 10:11 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Oct 29, 2011 at 05:32:29PM -0200, Cesar Eduardo Barros wrote:
> While looking at s3c2410's mach/io.h, I noticed the #define for
> __ioaddr() looked wrong. While the #defines above it called the "c"
> suffixed variant when __builtin_constant_p() was true, the one for
> __ioaddr() called the "c" suffixed variant (__ioaddrc()) when
> __builtin_constant_p() was *false*.
>
> Looking further, I noticed that __ioaddr() and __ioaddrc() were
> identical, the only difference being that __ioaddr() is an inline
> function and __ioaddrc() is a macro.
>
> __ioaddrc() is not used anywhere else. There were similar constructs,
> also reversed from what I'd expect, in both mach-clps7500 (removed from
> the kernel in 2.6.29) and mach-rpc. The copy in mach-rpc was removed in
> commit 6de2c31d3dad7384b3efa03674bd6ed479d58cb2 (rpc: remove obsolete IO
> accessors).
>
> Since __ioaddrc() is both redundant and useless, has no other uses, and
> has already been removed in mach-rpc, remove it also in mach-s3c2410.
Good. Now, what about that horrible fudge in the inb/outb etc accessors.
Can that be killed off as well?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-31 10:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-29 19:32 [PATCH] s3c2410: remove __ioaddrc() Cesar Eduardo Barros
2011-10-31 10:11 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox