Commit f282549a authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Linus Torvalds

[PATCH] H8/300: read{b,w,l} / write{b,w,l} error fix

read{b,w,l} and write{b,w,l} compile error fix.
Signed-off-by: default avatarYoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8c8efbbb
......@@ -70,15 +70,24 @@ static inline unsigned long _swapl(volatile unsigned long v)
}
#define readb(addr) \
({ unsigned char __v = (*(volatile unsigned char *) ((addr) & 0x00ffffff)); __v; })
({ unsigned char __v = \
*(volatile unsigned char *)((unsigned long)(addr) & 0x00ffffff); \
__v; })
#define readw(addr) \
({ unsigned short __v = (*(volatile unsigned short *) ((addr) & 0x00ffffff)); __v; })
({ unsigned short __v = \
*(volatile unsigned short *)((unsigned long)(addr) & 0x00ffffff); \
__v; })
#define readl(addr) \
({ unsigned int __v = (*(volatile unsigned int *) ((addr) & 0x00ffffff)); __v; })
#define writeb(b,addr) (void)((*(volatile unsigned char *) ((addr) & 0x00ffffff)) = (b))
#define writew(b,addr) (void)((*(volatile unsigned short *) ((addr) & 0x00ffffff)) = (b))
#define writel(b,addr) (void)((*(volatile unsigned int *) ((addr) & 0x00ffffff)) = (b))
({ unsigned long __v = \
*(volatile unsigned long *)((unsigned long)(addr) & 0x00ffffff); \
__v; })
#define writeb(b,addr) (void)((*(volatile unsigned char *) \
((unsigned long)(addr) & 0x00ffffff)) = (b))
#define writew(b,addr) (void)((*(volatile unsigned short *) \
((unsigned long)(addr) & 0x00ffffff)) = (b))
#define writel(b,addr) (void)((*(volatile unsigned long *) \
((unsigned long)(addr) & 0x00ffffff)) = (b))
#define readb_relaxed(addr) readb(addr)
#define readw_relaxed(addr) readw(addr)
#define readl_relaxed(addr) readl(addr)
......
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