From 1683440595ea33cc019fb8524b04319cf82bc6ac Mon Sep 17 00:00:00 2001 From: Guillaume Clement Date: Tue, 22 Jul 2014 22:08:26 +0200 Subject: staging: vt6655: change type of PortOffset to void __iomem * PortOffset was an unsigned long, but used as an pointer to io memory. Sometimes it was not properly cast before use, which caused many warning by sparse. By updating its type to void __iomem *, and reflecting the changes where it is needed, this removes most of those warnings. Signed-off-by: Guillaume Clement Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/upc.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'drivers/staging/vt6655/upc.h') diff --git a/drivers/staging/vt6655/upc.h b/drivers/staging/vt6655/upc.h index 155e664..af12a86 100644 --- a/drivers/staging/vt6655/upc.h +++ b/drivers/staging/vt6655/upc.h @@ -72,38 +72,32 @@ do { \ #define VNSvInPortB(dwIOAddress, pbyData) \ do { \ - volatile unsigned char *pbyAddr = (unsigned char *)(dwIOAddress); \ - *(pbyData) = readb(pbyAddr); \ + *(pbyData) = readb(dwIOAddress); \ } while (0) #define VNSvInPortW(dwIOAddress, pwData) \ do { \ - volatile unsigned short *pwAddr = (unsigned short *)(dwIOAddress); \ - *(pwData) = readw(pwAddr); \ + *(pwData) = readw(dwIOAddress); \ } while (0) #define VNSvInPortD(dwIOAddress, pdwData) \ do { \ - volatile unsigned long *pdwAddr = (unsigned long *)(dwIOAddress); \ - *(pdwData) = readl(pdwAddr); \ + *(pdwData) = readl(dwIOAddress); \ } while (0) #define VNSvOutPortB(dwIOAddress, byData) \ do { \ - volatile unsigned char *pbyAddr = (unsigned char *)(dwIOAddress); \ - writeb((unsigned char)byData, pbyAddr); \ + writeb((unsigned char)byData, dwIOAddress); \ } while (0) #define VNSvOutPortW(dwIOAddress, wData) \ do { \ - volatile unsigned short *pwAddr = ((unsigned short *)(dwIOAddress)); \ - writew((unsigned short)wData, pwAddr); \ + writew((unsigned short)wData, dwIOAddress); \ } while (0) #define VNSvOutPortD(dwIOAddress, dwData) \ do { \ - volatile unsigned long *pdwAddr = (unsigned long *)(dwIOAddress); \ - writel((unsigned long)dwData, pdwAddr); \ + writel((unsigned long)dwData, dwIOAddress); \ } while (0) #endif -- cgit v1.1