summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2004-10-21 04:04:56 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-21 04:04:56 -0700
commit77752839e8a15553eda7f2396f894eae80409a8d (patch)
tree6fe17bdcee3ba23391c9813432903d614bf1f2eb /include
parent5ce4d219cb2e0b1fc1c899555c4452f45020a25a (diff)
[PATCH] added typechecking ot sparc64 ioremap()
ioremap() made inlined function on sparc64; that had caught one bogosity in drivers, actually - cpwatchdog.c passed sizeof(structure that was never declared) as the second argument to ioremap(). It went unnoticed since that argument was never used in the body of macro, so it disappeared without a trace... Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-sparc64/io.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h
index 2d6aa90f074d..8c600b0603ff 100644
--- a/include/asm-sparc64/io.h
+++ b/include/asm-sparc64/io.h
@@ -444,9 +444,16 @@ out:
/* On sparc64 we have the whole physical IO address space accessible
* using physically addressed loads and stores, so this does nothing.
*/
-#define ioremap(__offset, __size) ((void __iomem *)(__offset))
+static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
+{
+ return (void __iomem *)offset;
+}
+
#define ioremap_nocache(X,Y) ioremap((X),(Y))
-#define iounmap(__addr) do { (void)(__addr); } while(0)
+
+static inline void iounmap(void __iomem *addr)
+{
+}
#define ioread8(X) readb(X)
#define ioread16(X) readw(X)