Commit e5105677 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] x86_64 io.h annotations

x86-64 memcpy_toio(), memcpy_fromio(), memset_io() and read{b,w,l,q}(),
switched to standard prototypes. 
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4b14c72f
......@@ -2,14 +2,14 @@
#include <asm/io.h>
#include <linux/module.h>
void *__memcpy_toio(unsigned long dst,const void*src,unsigned len)
void __memcpy_toio(unsigned long dst,const void*src,unsigned len)
{
return __inline_memcpy((void *) dst,src,len);
__inline_memcpy((void *) dst,src,len);
}
EXPORT_SYMBOL(__memcpy_toio);
void *__memcpy_fromio(void *dst,unsigned long src,unsigned len)
void __memcpy_fromio(void *dst,unsigned long src,unsigned len)
{
return __inline_memcpy(dst,(const void *) src,len);
__inline_memcpy(dst,(const void *) src,len);
}
EXPORT_SYMBOL(__memcpy_fromio);
......@@ -175,19 +175,19 @@ extern void iounmap(volatile void __iomem *addr);
* memory location directly.
*/
static inline __u8 __readb(volatile void __iomem *addr)
static inline __u8 __readb(const volatile void __iomem *addr)
{
return *(__force volatile __u8 *)addr;
}
static inline __u16 __readw(volatile void __iomem *addr)
static inline __u16 __readw(const volatile void __iomem *addr)
{
return *(__force volatile __u16 *)addr;
}
static inline __u32 __readl(volatile void __iomem *addr)
static inline __u32 __readl(const volatile void __iomem *addr)
{
return *(__force volatile __u32 *)addr;
}
static inline __u64 __readq(volatile void __iomem *addr)
static inline __u64 __readq(const volatile void __iomem *addr)
{
return *(__force volatile __u64 *)addr;
}
......@@ -249,20 +249,20 @@ static inline void __writew(__u16 b, volatile void __iomem *addr)
#define __raw_writel writel
#define __raw_writeq writeq
void *__memcpy_fromio(void*,unsigned long,unsigned);
void *__memcpy_toio(unsigned long,const void*,unsigned);
void __memcpy_fromio(void*,unsigned long,unsigned);
void __memcpy_toio(unsigned long,const void*,unsigned);
static inline void *memcpy_fromio(void *to, volatile void __iomem *from, unsigned len)
static inline void memcpy_fromio(void *to, const volatile void __iomem *from, unsigned len)
{
return __memcpy_fromio(to,(unsigned long)from,len);
__memcpy_fromio(to,(unsigned long)from,len);
}
static inline void *memcpy_toio(volatile void __iomem *to, const void *from, unsigned len)
static inline void memcpy_toio(volatile void __iomem *to, const void *from, unsigned len)
{
return __memcpy_toio((unsigned long)to,from,len);
__memcpy_toio((unsigned long)to,from,len);
}
static inline void *memset_io(volatile void __iomem *a, int b, size_t c)
static inline void memset_io(volatile void __iomem *a, int b, size_t c)
{
return memset((__force void *)a,b,c);
memset((__force void *)a,b,c);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment