Skip to contentSkip to conversation

staging: cxt1e1: hwprobe: fix incorrect type in assignment

PATCH In review Matei Oprea 2 participants 4 messages Mar 23, 2014 – Apr 7, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: cxt1e1: hwprobe: fix incorrect type in assignment

This patch fixes "incorrect type in argument 1" warning from sparse.

Cc ROSEdu Kernel Community <[email protected]>
---
 drivers/staging/cxt1e1/hwprobe.c       |    6 +++---
 drivers/staging/cxt1e1/pmcc4_private.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/cxt1e1/hwprobe.c +3 -3
index 9b4198b..1a145ea 100644
@@ -174,12 +174,12 @@ cleanup_ioremap(void)
 		if (hi->pci_slot == 0xff)
 			break;
 		if (hi->addr_mapped[0]) {
-			iounmap((void *)(hi->addr_mapped[0]));
+			iounmap(hi->addr_mapped[0]);
 			release_mem_region((long) hi->addr[0], hi->len[0]);
 			hi->addr_mapped[0] = 0;
 		}
 		if (hi->addr_mapped[1]) {
-			iounmap((void *)(hi->addr_mapped[1]));
+			iounmap(hi->addr_mapped[1]);
 			release_mem_region((long) hi->addr[1], hi->len[1]);
 			hi->addr_mapped[1] = 0;
 		}
@@ -329,7 +329,7 @@ c4hw_attach_all(void)
 				return -ENOMEM;
 			}
 
-			hi->addr_mapped[j] = (unsigned long)ioremap(hi->addr[j], hi->len[j]);
+			hi->addr_mapped[j] = ioremap(hi->addr[j], hi->len[j]);
 			if (!hi->addr_mapped[j]) {
 				pr_warning("%s: ioremap fails, addr=0x%lx, len=0x%lx ?\n",
 					   hi->devname, hi->addr[j], hi->len[j]);
drivers/staging/cxt1e1/pmcc4_private.h +1 -1
index eb28f09..451f12f 100644
@@ -262,7 +262,7 @@ struct s_hdw_info
     struct pci_dev *pdev[2];
 
     unsigned long addr[2];
-    unsigned long addr_mapped[2];
+    void __iomem *addr_mapped[2];
     unsigned long len[2];
 
     union
Signature · 1 line
1.7.9.5
#1 lore raw

Any comments on this ?
ᐧ

Quoted 53 lines · Matei Oprea

This patch fixes "incorrect type in argument 1" warning from sparse.

Cc ROSEdu Kernel Community <[email protected]>
---
 drivers/staging/cxt1e1/hwprobe.c       |    6 +++---
 drivers/staging/cxt1e1/pmcc4_private.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/cxt1e1/hwprobe.c +3 -3
index 9b4198b..1a145ea 100644
@@ -174,12 +174,12 @@ cleanup_ioremap(void)
                if (hi->pci_slot == 0xff)
                        break;
                if (hi->addr_mapped[0]) {
-                       iounmap((void *)(hi->addr_mapped[0]));
+                       iounmap(hi->addr_mapped[0]);
                        release_mem_region((long) hi->addr[0], hi->len[0]);
                        hi->addr_mapped[0] = 0;
                }
                if (hi->addr_mapped[1]) {
-                       iounmap((void *)(hi->addr_mapped[1]));
+                       iounmap(hi->addr_mapped[1]);
                        release_mem_region((long) hi->addr[1], hi->len[1]);
                        hi->addr_mapped[1] = 0;
                }
@@ -329,7 +329,7 @@ c4hw_attach_all(void)
                                return -ENOMEM;
                        }
 
-                       hi->addr_mapped[j] = (unsigned long)ioremap(hi->addr[j], hi->len[j]);
+                       hi->addr_mapped[j] = ioremap(hi->addr[j], hi->len[j]);
                        if (!hi->addr_mapped[j]) {
                                pr_warning("%s: ioremap fails, addr=0x%lx, len=0x%lx ?\n",
                                           hi->devname, hi->addr[j], hi->len[j]);
drivers/staging/cxt1e1/pmcc4_private.h +1 -2
index eb28f09..451f12f 100644
@@ -262,7 +262,7 @@ struct s_hdw_info
     struct pci_dev *pdev[2];
 
     unsigned long addr[2];
-    unsigned long addr_mapped[2];
+    void __iomem *addr_mapped[2];
     unsigned long len[2];
 
     union
--

1.7.9.5

Signature · 1 line
Oprea Matei
maintainer
#2 lore raw
Quoted 1 line · Matei Oprea

Any comments on this ?

You got an email from me about this, on the 23rd, saying that I can't do anything with it until 3.15-rc1 is out.

thanks,

greg k-h

#3 lore raw

Sorry,

I thought that it's out.
ᐧ

Quoted 9 lines · Greg KH
Quoted 1 line · Matei Oprea

Any comments on this ?

You got an email from me about this, on the 23rd, saying that I can't do anything with it until 3.15-rc1 is out.

thanks,

greg k-h

Signature · 1 line
Oprea Matei