Some warning: ... cleanup?

"Joel Soete" <[email protected]> Mon, 18 Jun 2007 15:22:02 +0200
Newsgroups gmane.linux.ports.hppa
Message-ID <[email protected]>
Hello Kyle,

I was trying your patch v2.6.22-rc4 and fiure out some warnings:

/CAD/linux-2.6.22-rc4/drivers/parisc/dino.c:821: warning: format ‘%lx’ expects
type ‘long unsigned int’, but argument 4 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/parisc/dino.c:821: warning: format ‘%lx’ expects
type ‘long unsigned int’, but argument 5 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/parisc/dino.c:901: warning: format ‘%lx’ expects
type ‘long unsigned int’, but argument 3 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/parisc/dino.c:901: warning: format ‘%lx’ expects
type ‘long unsigned int’, but argument 4 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/parisc/asp.c:85: warning: format ‘%lx’ expects
type ‘long unsigned int’, but argument 4 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/parisc/eisa.c:317: warning: format ‘%08lx’
expects type ‘long unsigned int’, but argument 3 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/parisc/eisa_enumerator.c:101: warning: format
‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/parisc/eisa_enumerator.c:101: warning: format
‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/parisc/eisa_enumerator.c:191: warning: format
‘%lx’ expects type ‘long unsigned int’, but argument 2 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/parisc/eisa_enumerator.c:191: warning: format
‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/parport/parport_gsc.c:362: warning: format ‘%lx’
expects type ‘long unsigned int’, but argument 2 has type ‘resource_size_t’
/CAD/linux-2.6.22-rc4/drivers/serial/8250_gsc.c:44: warning: format ‘%lx’
expects type ‘long unsigned int’, but argument 2 has type ‘resource_size_t’

I just got this SomeStuff.diff.

(imho just the same kind of patch already applied upstream a while ago,
regarding resource_size_t change:
<http://www.linuxhq.com/kernel/v2.6/18/kernel/resource.c>)

Fill free to use it at your best convenience.

J.


---
http://www.scarlet.be/

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
SomeStuff.diff (application/octet-stream, 3.5 KB)
--- ./drivers/parisc/dino.c.Orig	2007-06-18 09:05:05.000000000 +0000
+++ ./drivers/parisc/dino.c	2007-06-18 08:59:43.000000000 +0000
@@ -899,8 +899,8 @@
 	res->flags = IORESOURCE_IO; /* do not mark it busy ! */
 	if (request_resource(&ioport_resource, res) < 0) {
 		printk(KERN_ERR "%s: request I/O Port region failed "
-		       "0x%lx/%lx (hpa 0x%p)\n",
-		       name, res->start, res->end, dino_dev->hba.base_addr);
+		       "0x%llx/%llx (hpa 0x%p)\n",
+		       name, (unsigned long long) res->start, (unsigned long long) res->end, dino_dev->hba.base_addr);
 		return 1;
 	}
 
--- ./drivers/parisc/asp.c.Orig	2007-06-18 09:05:15.000000000 +0000
+++ ./drivers/parisc/asp.c	2007-06-18 09:00:54.000000000 +0000
@@ -81,8 +81,8 @@
 	asp.name = (asp.version == 1) ? "Asp" : "Cutoff";
 	asp.hpa = ASP_INTERRUPT_ADDR;
 
-	printk(KERN_INFO "%s version %d at 0x%lx found.\n", 
-		asp.name, asp.version, dev->hpa.start);
+	printk(KERN_INFO "%s version %d at 0x%llx found.\n", 
+		asp.name, asp.version, (unsigned long long) dev->hpa.start);
 
 	/* the IRQ ASP should use */
 	ret = -EBUSY;
--- ./drivers/parisc/eisa.c.Orig	2007-06-18 09:05:27.000000000 +0000
+++ ./drivers/parisc/eisa.c	2007-06-18 11:58:00.000000000 +0000
@@ -313,8 +313,8 @@
 
 	char *name = is_mongoose(dev) ? "Mongoose" : "Wax";
 
-	printk(KERN_INFO "%s EISA Adapter found at 0x%08lx\n", 
-		name, dev->hpa.start);
+	printk(KERN_INFO "%s EISA Adapter found at 0x%llx\n", 
+		name, (unsigned long long) dev->hpa.start);
 
 	eisa_dev.hba.dev = dev;
 	eisa_dev.hba.iommu = ccio_get_iommu(dev);
--- ./drivers/parisc/eisa_enumerator.c.Orig	2007-06-18 09:05:42.000000000 +0000
+++ ./drivers/parisc/eisa_enumerator.c	2007-06-18 09:03:22.000000000 +0000
@@ -188,7 +188,7 @@
 			res->start = get_16(buf+len+1);
 			res->end = get_16(buf+len+1)+(c&HPEE_PORT_SIZE_MASK)+1;
 			res->flags = IORESOURCE_IO;
-			printk("ioports %lx-%lx ", res->start, res->end);
+			printk("ioports %llx-%llx ", (unsigned long long) res->start, (unsigned long long) res->end);
 			result = request_resource(io_parent, res);
 			if (result < 0) {
 				printk("\n" KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n");
--- ./drivers/parisc/sba_iommu.c.Orig	2007-06-18 09:21:14.000000000 +0000
+++ ./drivers/parisc/sba_iommu.c	2007-06-18 09:20:34.000000000 +0000
@@ -1909,8 +1909,8 @@
 			global_ioc_cnt *= 2;
 	}
 
-	printk(KERN_INFO "%s found %s at 0x%lx\n",
-		MODULE_NAME, version, dev->hpa.start);
+	printk(KERN_INFO "%s found %s at 0x%llx\n",
+		MODULE_NAME, version, (unsigned long long) dev->hpa.start);
 
 	sba_dev = kzalloc(sizeof(struct sba_device), GFP_KERNEL);
 	if (!sba_dev) {
--- ./drivers/parport/parport_gsc.c.Orig	2007-06-18 09:05:51.000000000 +0000
+++ ./drivers/parport/parport_gsc.c	2007-06-18 09:04:35.000000000 +0000
@@ -358,8 +358,8 @@
 	unsigned long port;
 
 	if (!dev->irq) {
-		printk(KERN_WARNING "IRQ not found for parallel device at 0x%lx\n",
-			dev->hpa.start);
+		printk(KERN_WARNING "IRQ not found for parallel device at 0x%llx\n",
+			(unsigned long long) dev->hpa.start);
 		return -ENODEV;
 	}
 
--- ./drivers/serial/8250_gsc.c.Orig	2007-06-18 09:06:01.000000000 +0000
+++ ./drivers/serial/8250_gsc.c	2007-06-18 08:57:54.000000000 +0000
@@ -39,9 +39,9 @@
 		 * the user what they're missing.
 		 */
 		if (parisc_parent(dev)->id.hw_type != HPHW_IOA) {
-			printk(KERN_INFO "Serial: device 0x%lx not configured.\n"
+			printk(KERN_INFO "Serial: device 0x%llx not configured.\n"
 				"Enable support for Wax, Lasi, Asp or Dino.\n",
-				dev->hpa.start);
+				(unsigned long long) dev->hpa.start);
 		}
 		return -ENODEV;
 	}