Commit 4ada1114 authored by Anders Darander's avatar Anders Darander Committed by Greg Kroah-Hartman

staging/rtl8821ae: fix sparse address space warning

Change the definition of pci_mem_start|end from correct from pci_io(un)map's
point of view.
Signed-off-by: default avatarAnders Darander <anders.darander@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 84fcb4b3
...@@ -2313,16 +2313,16 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, ...@@ -2313,16 +2313,16 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
/*shared mem start */ /*shared mem start */
rtlpriv->io.pci_mem_start = rtlpriv->io.pci_mem_start =
(unsigned long)pci_iomap(pdev, pci_iomap(pdev,
rtlpriv->cfg->bar_id, pmem_len); rtlpriv->cfg->bar_id, pmem_len);
if (rtlpriv->io.pci_mem_start == 0) { if (rtlpriv->io.pci_mem_start == NULL) {
RT_ASSERT(false, ("Can't map PCI mem\n")); RT_ASSERT(false, ("Can't map PCI mem\n"));
goto fail2; goto fail2;
} }
RT_TRACE(COMP_INIT, DBG_DMESG, RT_TRACE(COMP_INIT, DBG_DMESG,
("mem mapped space: start: 0x%08lx len:%08lx " ("mem mapped space: start: 0x%08lx len:%08lx "
"flags:%08lx, after map:0x%08lx\n", "flags:%08lx, after map:0x%p\n",
pmem_start, pmem_len, pmem_flags, pmem_start, pmem_len, pmem_flags,
rtlpriv->io.pci_mem_start)); rtlpriv->io.pci_mem_start));
...@@ -2415,8 +2415,8 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, ...@@ -2415,8 +2415,8 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev,
rtl_deinit_core(hw); rtl_deinit_core(hw);
ieee80211_free_hw(hw); ieee80211_free_hw(hw);
if (rtlpriv->io.pci_mem_start != 0) if (rtlpriv->io.pci_mem_start != NULL)
pci_iounmap(pdev, (void *)rtlpriv->io.pci_mem_start); pci_iounmap(pdev, rtlpriv->io.pci_mem_start);
fail2: fail2:
pci_release_regions(pdev); pci_release_regions(pdev);
...@@ -2478,8 +2478,8 @@ void rtl_pci_disconnect(struct pci_dev *pdev) ...@@ -2478,8 +2478,8 @@ void rtl_pci_disconnect(struct pci_dev *pdev)
pci_disable_msi(rtlpci->pdev); pci_disable_msi(rtlpci->pdev);
list_del(&rtlpriv->list); list_del(&rtlpriv->list);
if (rtlpriv->io.pci_mem_start != 0) { if (rtlpriv->io.pci_mem_start != NULL) {
pci_iounmap(pdev, (void *)rtlpriv->io.pci_mem_start); pci_iounmap(pdev, rtlpriv->io.pci_mem_start);
pci_release_regions(pdev); pci_release_regions(pdev);
} }
......
...@@ -1086,8 +1086,8 @@ struct rtl_io { ...@@ -1086,8 +1086,8 @@ struct rtl_io {
struct device *dev; struct device *dev;
/*PCI MEM map */ /*PCI MEM map */
unsigned long pci_mem_end; /*shared mem end */ void __iomem *pci_mem_end; /*shared mem end */
unsigned long pci_mem_start; /*shared mem start */ void __iomem *pci_mem_start; /*shared mem start */
/*PCI IO map */ /*PCI IO map */
unsigned long pci_base_addr; /*device I/O address */ unsigned long pci_base_addr; /*device I/O address */
......
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