diff mbox

[OPW,kernel,2/4] staging: rtl8187se: add missing __iomem annotation

Message ID 1382206188-12297-3-git-send-email-teobaluta@gmail.com
State New, archived
Headers show

Commit Message

Teodora Baluta Oct. 19, 2013, 6:09 p.m. UTC
Fix the following type of sparse warnings:

drivers/staging/rtl8187se/r8180_core.c:163:48: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/rtl8187se/r8180_core.c:163:48:    expected void const volatile [noderef] <asn:2>*addr
drivers/staging/rtl8187se/r8180_core.c:163:48:    got unsigned char [usertype] *

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
---
 drivers/staging/rtl8187se/r8180_core.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Waskiewicz Jr, Peter P Oct. 20, 2013, 12:33 a.m. UTC | #1
On Sat, 2013-10-19 at 21:09 +0300, Teodora Baluta wrote:
> Fix the following type of sparse warnings:
> 
> drivers/staging/rtl8187se/r8180_core.c:163:48: warning: incorrect type in argument 1 (different address spaces)
> drivers/staging/rtl8187se/r8180_core.c:163:48:    expected void const volatile [noderef] <asn:2>*addr
> drivers/staging/rtl8187se/r8180_core.c:163:48:    got unsigned char [usertype] *

Same feedback on the commit log exceeding line lengths.

The rest of the patch looks fine.

Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>

> Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
> ---
>  drivers/staging/rtl8187se/r8180_core.c |   16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
> index 48ce9a6..fb24fce 100644
> --- a/drivers/staging/rtl8187se/r8180_core.c
> +++ b/drivers/staging/rtl8187se/r8180_core.c
> @@ -160,34 +160,34 @@ static struct pci_driver rtl8180_pci_driver = {
>  
>  u8 read_nic_byte(struct net_device *dev, int x)
>  {
> -	return 0xff&readb((u8 *)dev->mem_start + x);
> +	return 0xff&readb((u8 __iomem *)dev->mem_start + x);
>  }
>  
>  u32 read_nic_dword(struct net_device *dev, int x)
>  {
> -	return readl((u8 *)dev->mem_start + x);
> +	return readl((u8 __iomem *)dev->mem_start + x);
>  }
>  
>  u16 read_nic_word(struct net_device *dev, int x)
>  {
> -	return readw((u8 *)dev->mem_start + x);
> +	return readw((u8 __iomem *)dev->mem_start + x);
>  }
>  
>  void write_nic_byte(struct net_device *dev, int x, u8 y)
>  {
> -	writeb(y, (u8 *)dev->mem_start + x);
> +	writeb(y, (u8 __iomem *)dev->mem_start + x);
>  	udelay(20);
>  }
>  
>  void write_nic_dword(struct net_device *dev, int x, u32 y)
>  {
> -	writel(y, (u8 *)dev->mem_start + x);
> +	writel(y, (u8 __iomem *)dev->mem_start + x);
>  	udelay(20);
>  }
>  
>  void write_nic_word(struct net_device *dev, int x, u16 y)
>  {
> -	writew(y, (u8 *)dev->mem_start + x);
> +	writew(y, (u8 __iomem *)dev->mem_start + x);
>  	udelay(20);
>  }
>  
> @@ -3251,7 +3251,7 @@ static int rtl8180_pci_probe(struct pci_dev *pdev,
>  	return 0;
>  fail1:
>  	if (dev->mem_start != (unsigned long)NULL) {
> -		iounmap((void *)dev->mem_start);
> +		iounmap((void __iomem *)dev->mem_start);
>  		release_mem_region(pci_resource_start(pdev, 1),
>  				   pci_resource_len(pdev, 1));
>  	}
> @@ -3297,7 +3297,7 @@ static void rtl8180_pci_remove(struct pci_dev *pdev)
>  		free_tx_desc_rings(dev);
>  
>  		if (dev->mem_start != (unsigned long)NULL) {
> -			iounmap((void *)dev->mem_start);
> +			iounmap((void __iomem *)dev->mem_start);
>  			release_mem_region(pci_resource_start(pdev, 1),
>  					   pci_resource_len(pdev, 1));
>  		}
> -- 
> 1.7.10.4
>
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 48ce9a6..fb24fce 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -160,34 +160,34 @@  static struct pci_driver rtl8180_pci_driver = {
 
 u8 read_nic_byte(struct net_device *dev, int x)
 {
-	return 0xff&readb((u8 *)dev->mem_start + x);
+	return 0xff&readb((u8 __iomem *)dev->mem_start + x);
 }
 
 u32 read_nic_dword(struct net_device *dev, int x)
 {
-	return readl((u8 *)dev->mem_start + x);
+	return readl((u8 __iomem *)dev->mem_start + x);
 }
 
 u16 read_nic_word(struct net_device *dev, int x)
 {
-	return readw((u8 *)dev->mem_start + x);
+	return readw((u8 __iomem *)dev->mem_start + x);
 }
 
 void write_nic_byte(struct net_device *dev, int x, u8 y)
 {
-	writeb(y, (u8 *)dev->mem_start + x);
+	writeb(y, (u8 __iomem *)dev->mem_start + x);
 	udelay(20);
 }
 
 void write_nic_dword(struct net_device *dev, int x, u32 y)
 {
-	writel(y, (u8 *)dev->mem_start + x);
+	writel(y, (u8 __iomem *)dev->mem_start + x);
 	udelay(20);
 }
 
 void write_nic_word(struct net_device *dev, int x, u16 y)
 {
-	writew(y, (u8 *)dev->mem_start + x);
+	writew(y, (u8 __iomem *)dev->mem_start + x);
 	udelay(20);
 }
 
@@ -3251,7 +3251,7 @@  static int rtl8180_pci_probe(struct pci_dev *pdev,
 	return 0;
 fail1:
 	if (dev->mem_start != (unsigned long)NULL) {
-		iounmap((void *)dev->mem_start);
+		iounmap((void __iomem *)dev->mem_start);
 		release_mem_region(pci_resource_start(pdev, 1),
 				   pci_resource_len(pdev, 1));
 	}
@@ -3297,7 +3297,7 @@  static void rtl8180_pci_remove(struct pci_dev *pdev)
 		free_tx_desc_rings(dev);
 
 		if (dev->mem_start != (unsigned long)NULL) {
-			iounmap((void *)dev->mem_start);
+			iounmap((void __iomem *)dev->mem_start);
 			release_mem_region(pci_resource_start(pdev, 1),
 					   pci_resource_len(pdev, 1));
 		}