aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-03-19 06:54:07 -0400
committerKyle McMartin <kyle@mcmartin.ca>2009-04-01 20:40:41 -0400
commitc18b4608958ff42ce9a1a55b0a6f40b714f47286 (patch)
tree3fe1b4f9c8e57ac30e938c9515f1d10b8edaeed5 /drivers
parentf67d3c83f3f1e6523325628434bf19e5166b39b3 (diff)
parisc: drivers: fix warnings
ccio-dma.c:456: warning: overflow in implicit constant conversion ccio-dma.c:459: warning: overflow in implicit constant conversion ccio-dma.c:1032: warning: unused variable 'j' ccio-dma.c:1031: warning: unused variable 'max' ccio-dma.c:1031: warning: unused variable 'min' ccio-dma.c:1031: warning: unused variable 'avg' ccio-dma.c:1403: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' ccio-dma.c:1403: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t' ccio-dma.c:1554: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' dino.c:822: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t' dino.c:822: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'resource_size_t' dino.c:902: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' dino.c:902: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t' asp.c:84: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t' eisa.c:317: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' eisa_enumerator.c:101: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t' eisa_enumerator.c:101: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' eisa_enumerator.c:191: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t' eisa_enumerator.c:191: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/parisc/asp.c2
-rw-r--r--drivers/parisc/ccio-dma.c16
-rw-r--r--drivers/parisc/dino.c7
-rw-r--r--drivers/parisc/eisa.c2
-rw-r--r--drivers/parisc/eisa_enumerator.c4
5 files changed, 17 insertions, 14 deletions
diff --git a/drivers/parisc/asp.c b/drivers/parisc/asp.c
index 7931133526c4..9ca21098b146 100644
--- a/drivers/parisc/asp.c
+++ b/drivers/parisc/asp.c
@@ -81,7 +81,7 @@ static int __init asp_init_chip(struct parisc_device *dev)
81 asp.hpa = ASP_INTERRUPT_ADDR; 81 asp.hpa = ASP_INTERRUPT_ADDR;
82 82
83 printk(KERN_INFO "%s version %d at 0x%lx found.\n", 83 printk(KERN_INFO "%s version %d at 0x%lx found.\n",
84 asp.name, asp.version, dev->hpa.start); 84 asp.name, asp.version, (unsigned long)dev->hpa.start);
85 85
86 /* the IRQ ASP should use */ 86 /* the IRQ ASP should use */
87 ret = -EBUSY; 87 ret = -EBUSY;
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index cd4dd7ed2c06..5d610cbcfe80 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -406,8 +406,6 @@ resource_found:
406 } 406 }
407 ioc->avg_search[ioc->avg_idx++] = cr_start; 407 ioc->avg_search[ioc->avg_idx++] = cr_start;
408 ioc->avg_idx &= CCIO_SEARCH_SAMPLE - 1; 408 ioc->avg_idx &= CCIO_SEARCH_SAMPLE - 1;
409#endif
410#ifdef CCIO_COLLECT_STATS
411 ioc->used_pages += pages_needed; 409 ioc->used_pages += pages_needed;
412#endif 410#endif
413 /* 411 /*
@@ -453,10 +451,10 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped)
453 unsigned long mask = ~(~0UL >> pages_mapped); 451 unsigned long mask = ~(~0UL >> pages_mapped);
454 CCIO_FREE_MAPPINGS(ioc, res_idx, mask, 8); 452 CCIO_FREE_MAPPINGS(ioc, res_idx, mask, 8);
455#else 453#else
456 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xff, 8); 454 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffUL, 8);
457#endif 455#endif
458 } else if(pages_mapped <= 16) { 456 } else if(pages_mapped <= 16) {
459 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffff, 16); 457 CCIO_FREE_MAPPINGS(ioc, res_idx, 0xffffUL, 16);
460 } else if(pages_mapped <= 32) { 458 } else if(pages_mapped <= 32) {
461 CCIO_FREE_MAPPINGS(ioc, res_idx, ~(unsigned int)0, 32); 459 CCIO_FREE_MAPPINGS(ioc, res_idx, ~(unsigned int)0, 32);
462#ifdef __LP64__ 460#ifdef __LP64__
@@ -1028,8 +1026,10 @@ static int ccio_proc_info(struct seq_file *m, void *p)
1028 1026
1029 while (ioc != NULL) { 1027 while (ioc != NULL) {
1030 unsigned int total_pages = ioc->res_size << 3; 1028 unsigned int total_pages = ioc->res_size << 3;
1029#ifdef CCIO_COLLECT_STATS
1031 unsigned long avg = 0, min, max; 1030 unsigned long avg = 0, min, max;
1032 int j; 1031 int j;
1032#endif
1033 1033
1034 len += seq_printf(m, "%s\n", ioc->name); 1034 len += seq_printf(m, "%s\n", ioc->name);
1035 1035
@@ -1060,8 +1060,7 @@ static int ccio_proc_info(struct seq_file *m, void *p)
1060 avg /= CCIO_SEARCH_SAMPLE; 1060 avg /= CCIO_SEARCH_SAMPLE;
1061 len += seq_printf(m, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n", 1061 len += seq_printf(m, " Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n",
1062 min, avg, max); 1062 min, avg, max);
1063#endif 1063
1064#ifdef CCIO_COLLECT_STATS
1065 len += seq_printf(m, "pci_map_single(): %8ld calls %8ld pages (avg %d/1000)\n", 1064 len += seq_printf(m, "pci_map_single(): %8ld calls %8ld pages (avg %d/1000)\n",
1066 ioc->msingle_calls, ioc->msingle_pages, 1065 ioc->msingle_calls, ioc->msingle_pages,
1067 (int)((ioc->msingle_pages * 1000)/ioc->msingle_calls)); 1066 (int)((ioc->msingle_pages * 1000)/ioc->msingle_calls));
@@ -1400,7 +1399,7 @@ ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr)
1400 result = insert_resource(&iomem_resource, res); 1399 result = insert_resource(&iomem_resource, res);
1401 if (result < 0) { 1400 if (result < 0) {
1402 printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n", 1401 printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n",
1403 __func__, res->start, res->end); 1402 __func__, (unsigned long)res->start, (unsigned long)res->end);
1404 } 1403 }
1405} 1404}
1406 1405
@@ -1551,7 +1550,8 @@ static int __init ccio_probe(struct parisc_device *dev)
1551 1550
1552 ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn"; 1551 ioc->name = dev->id.hversion == U2_IOA_RUNWAY ? "U2" : "UTurn";
1553 1552
1554 printk(KERN_INFO "Found %s at 0x%lx\n", ioc->name, dev->hpa.start); 1553 printk(KERN_INFO "Found %s at 0x%lx\n", ioc->name,
1554 (unsigned long)dev->hpa.start);
1555 1555
1556 for (i = 0; i < ioc_count; i++) { 1556 for (i = 0; i < ioc_count; i++) {
1557 ioc_p = &(*ioc_p)->next; 1557 ioc_p = &(*ioc_p)->next;
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index bb5a1c9597cb..52ae0b1d470c 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -819,7 +819,9 @@ dino_bridge_init(struct dino_device *dino_dev, const char *name)
819 819
820 result = ccio_request_resource(dino_dev->hba.dev, &res[i]); 820 result = ccio_request_resource(dino_dev->hba.dev, &res[i]);
821 if (result < 0) { 821 if (result < 0) {
822 printk(KERN_ERR "%s: failed to claim PCI Bus address space %d (0x%lx-0x%lx)!\n", name, i, res[i].start, res[i].end); 822 printk(KERN_ERR "%s: failed to claim PCI Bus address "
823 "space %d (0x%lx-0x%lx)!\n", name, i,
824 (unsigned long)res[i].start, (unsigned long)res[i].end);
823 return result; 825 return result;
824 } 826 }
825 } 827 }
@@ -899,7 +901,8 @@ static int __init dino_common_init(struct parisc_device *dev,
899 if (request_resource(&ioport_resource, res) < 0) { 901 if (request_resource(&ioport_resource, res) < 0) {
900 printk(KERN_ERR "%s: request I/O Port region failed " 902 printk(KERN_ERR "%s: request I/O Port region failed "
901 "0x%lx/%lx (hpa 0x%p)\n", 903 "0x%lx/%lx (hpa 0x%p)\n",
902 name, res->start, res->end, dino_dev->hba.base_addr); 904 name, (unsigned long)res->start, (unsigned long)res->end,
905 dino_dev->hba.base_addr);
903 return 1; 906 return 1;
904 } 907 }
905 908
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c
index 7891db50c483..f415fdd9a885 100644
--- a/drivers/parisc/eisa.c
+++ b/drivers/parisc/eisa.c
@@ -314,7 +314,7 @@ static int __init eisa_probe(struct parisc_device *dev)
314 char *name = is_mongoose(dev) ? "Mongoose" : "Wax"; 314 char *name = is_mongoose(dev) ? "Mongoose" : "Wax";
315 315
316 printk(KERN_INFO "%s EISA Adapter found at 0x%08lx\n", 316 printk(KERN_INFO "%s EISA Adapter found at 0x%08lx\n",
317 name, dev->hpa.start); 317 name, (unsigned long)dev->hpa.start);
318 318
319 eisa_dev.hba.dev = dev; 319 eisa_dev.hba.dev = dev;
320 eisa_dev.hba.iommu = ccio_get_iommu(dev); 320 eisa_dev.hba.iommu = ccio_get_iommu(dev);
diff --git a/drivers/parisc/eisa_enumerator.c b/drivers/parisc/eisa_enumerator.c
index 6d8aae003f6c..c709ecc2b7f7 100644
--- a/drivers/parisc/eisa_enumerator.c
+++ b/drivers/parisc/eisa_enumerator.c
@@ -98,7 +98,7 @@ static int configure_memory(const unsigned char *buf,
98 res->start = mem_parent->start + get_24(buf+len+2); 98 res->start = mem_parent->start + get_24(buf+len+2);
99 res->end = res->start + get_16(buf+len+5)*1024; 99 res->end = res->start + get_16(buf+len+5)*1024;
100 res->flags = IORESOURCE_MEM; 100 res->flags = IORESOURCE_MEM;
101 printk("memory %lx-%lx ", res->start, res->end); 101 printk("memory %lx-%lx ", (unsigned long)res->start, (unsigned long)res->end);
102 result = request_resource(mem_parent, res); 102 result = request_resource(mem_parent, res);
103 if (result < 0) { 103 if (result < 0) {
104 printk("\n" KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n"); 104 printk("\n" KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n");
@@ -188,7 +188,7 @@ static int configure_port(const unsigned char *buf, struct resource *io_parent,
188 res->start = get_16(buf+len+1); 188 res->start = get_16(buf+len+1);
189 res->end = get_16(buf+len+1)+(c&HPEE_PORT_SIZE_MASK)+1; 189 res->end = get_16(buf+len+1)+(c&HPEE_PORT_SIZE_MASK)+1;
190 res->flags = IORESOURCE_IO; 190 res->flags = IORESOURCE_IO;
191 printk("ioports %lx-%lx ", res->start, res->end); 191 printk("ioports %lx-%lx ", (unsigned long)res->start, (unsigned long)res->end);
192 result = request_resource(io_parent, res); 192 result = request_resource(io_parent, res);
193 if (result < 0) { 193 if (result < 0) {
194 printk("\n" KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n"); 194 printk("\n" KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n");