Commit 8e87b1b3 authored by Teodora Baluta's avatar Teodora Baluta Committed by Greg Kroah-Hartman

staging: rtl8187se: add missing __iomem annotation

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: default avatarTeodora Baluta <teobaluta@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b65c5bb
......@@ -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));
}
......
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