Skip to contentSkip to conversation

staging/altera: fix printk format warnings

PATCH Applied Randy Dunlap 2 participants 2 messages Feb 11, 2009 – Feb 12, 2009 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/9 staging/altera: fix printk format warnings

From: Randy Dunlap <[email protected]>

Fix printk format warnings in altera pcie chdma:

drivers/staging/altpciechdma/altpciechdma.c:429: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t' drivers/staging/altpciechdma/altpciechdma.c:433: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t' drivers/staging/altpciechdma/altpciechdma.c:449: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t' drivers/staging/altpciechdma/altpciechdma.c:450: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t'

---
 drivers/staging/altpciechdma/altpciechdma.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/staging/altpciechdma/altpciechdma.c +8 -4
@@ -426,11 +426,13 @@ static int ape_sg_to_chdma_table(struct 
 		dma_addr_t next = sg_dma_address(&sgl[i + 1]);
 		/* length of this entry i */
 		len = sg_dma_len(&sgl[i]);
-		printk(KERN_DEBUG "%04d: addr=0x%08x length=0x%08x\n", i, addr, len);
+		printk(KERN_DEBUG "%04d: addr=0x%Lx length=0x%08x\n", i,
+			(unsigned long long)addr, len);
 		/* entry i + 1 is non-contiguous with entry i? */
 		if (next != addr + len) {
 			/* TODO create entry here (we could overwrite i) */
-			printk(KERN_DEBUG "%4d: cont_addr=0x%08x cont_len=0x%08x\n", j, cont_addr, cont_len);
+			printk(KERN_DEBUG "%4d: cont_addr=0x%Lx cont_len=0x%08x\n", j,
+				(unsigned long long)cont_addr, cont_len);
 			/* set descriptor for contiguous transfer */
 			ape_chdma_desc_set(&desc[j], cont_addr, ep_addr, cont_len);
 			/* next end point memory address */
@@ -446,8 +448,10 @@ static int ape_sg_to_chdma_table(struct 
 		addr = next;
 	}
 	/* TODO create entry here  (we could overwrite i) */
-	printk(KERN_DEBUG "%04d: addr=0x%08x length=0x%08x\n", i, addr, len);
-	printk(KERN_DEBUG "%4d: cont_addr=0x%08x length=0x%08x\n", j, cont_addr, cont_len);
+	printk(KERN_DEBUG "%04d: addr=0x%Lx length=0x%08x\n", i,
+		(unsigned long long)addr, len);
+	printk(KERN_DEBUG "%4d: cont_addr=0x%Lx length=0x%08x\n", j,
+		(unsigned long long)cont_addr, cont_len);
 	j++;
 	return j;
 }
#1 lore raw

patch staging-altera-fix-printk-format-warnings.patch added to gregkh-2.6 tree

This is a note to let you know that I've just added the patch titled

Subject: Staging: altera: fix printk format warnings

to my gregkh-2.6 tree. Its filename is

staging-altera-fix-printk-format-warnings.patch

This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/

Quoted 1 line

From [email protected] Thu Feb 12 11:52:06 2009

From: Randy Dunlap <[email protected]>
Date: Wed, 11 Feb 2009 13:14:17 -0800
Subject: Staging: altera: fix printk format warnings
To: lkml <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>

From: Randy Dunlap <[email protected]>

Fix printk format warnings in altera pcie chdma:

drivers/staging/altpciechdma/altpciechdma.c:429: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t' drivers/staging/altpciechdma/altpciechdma.c:433: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t' drivers/staging/altpciechdma/altpciechdma.c:449: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t' drivers/staging/altpciechdma/altpciechdma.c:450: warning: format '%08x' expects type 'unsigned int', but argument 3 has type 'dma_addr_t'

---
 drivers/staging/altpciechdma/altpciechdma.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/staging/altpciechdma/altpciechdma.c +8 -4
@@ -426,11 +426,13 @@ static int ape_sg_to_chdma_table(struct 
 		dma_addr_t next = sg_dma_address(&sgl[i + 1]);
 		/* length of this entry i */
 		len = sg_dma_len(&sgl[i]);
-		printk(KERN_DEBUG "%04d: addr=0x%08x length=0x%08x\n", i, addr, len);
+		printk(KERN_DEBUG "%04d: addr=0x%Lx length=0x%08x\n", i,
+			(unsigned long long)addr, len);
 		/* entry i + 1 is non-contiguous with entry i? */
 		if (next != addr + len) {
 			/* TODO create entry here (we could overwrite i) */
-			printk(KERN_DEBUG "%4d: cont_addr=0x%08x cont_len=0x%08x\n", j, cont_addr, cont_len);
+			printk(KERN_DEBUG "%4d: cont_addr=0x%Lx cont_len=0x%08x\n", j,
+				(unsigned long long)cont_addr, cont_len);
 			/* set descriptor for contiguous transfer */
 			ape_chdma_desc_set(&desc[j], cont_addr, ep_addr, cont_len);
 			/* next end point memory address */
@@ -446,8 +448,10 @@ static int ape_sg_to_chdma_table(struct 
 		addr = next;
 	}
 	/* TODO create entry here  (we could overwrite i) */
-	printk(KERN_DEBUG "%04d: addr=0x%08x length=0x%08x\n", i, addr, len);
-	printk(KERN_DEBUG "%4d: cont_addr=0x%08x length=0x%08x\n", j, cont_addr, cont_len);
+	printk(KERN_DEBUG "%04d: addr=0x%Lx length=0x%08x\n", i,
+		(unsigned long long)addr, len);
+	printk(KERN_DEBUG "%4d: cont_addr=0x%Lx length=0x%08x\n", j,
+		(unsigned long long)cont_addr, cont_len);
 	j++;
 	return j;
 }

Patches currently in gregkh-2.6 which might be from [email protected] are

pending/firmware-add-kconfig-and-makefile-to-build-the-firmware-samples.patch staging/staging-dst-kconfig-update.patch staging/staging-dst-fix-build-dependancy.patch staging/staging-rt2860-fix-printk-format-warnings.patch staging/staging-rtl8187se-fix-kconfig-dependencies.patch staging/staging-rtl8187se-fix-printk-format-warnings.patch staging/staging-stlc45xx-fix-printk-format-warnings.patch staging/staging-otus-fix-mixed-declarations.patch staging/staging-android-ram_console-fix-printk-format-warning.patch staging/staging-android-binder-fix-printk-format-warnings.patch staging/staging-altera-fix-printk-format-warnings.patch