Skip to contentSkip to conversation

swiotlb: fix gcc printk warning

PATCH Applied Randy.Dunlap 2 participants 2 messages Jan 14, 2005 – Jan 15, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 swiotlb: fix gcc printk warning

swiotlb: Fix gcc printk format warning on x86_64, OK for ia64:
arch/ia64/lib/swiotlb.c:351: warning: long unsigned int format, long long unsigned int arg (arg 2)

diffstat:=

 arch/ia64/lib/swiotlb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

---

arch/ia64/lib/swiotlb.c renamed from arch/ia64/lib/swiotlb.c~swiotlb_types +2 -2
diff -Naurp ./arch/ia64/lib/swiotlb.c~swiotlb_types ./arch/ia64/lib/swiotlb.c
@@ -347,8 +347,8 @@ swiotlb_alloc_coherent(struct device *hw
 
 	/* Confirm address can be DMA'd by device */
 	if (address_needs_mapping(hwdev, dev_addr)) {
-		printk("hwdev DMA mask = 0x%016lx, dev_addr = 0x%016lx\n",
-		       *hwdev->dma_mask, dev_addr);
+		printk("hwdev DMA mask = 0x%016Lx, dev_addr = 0x%016lx\n",
+		       (unsigned long long)*hwdev->dma_mask, dev_addr);
 		panic("swiotlb_alloc_coherent: allocated memory is out of "
 		      "range for device");
 	}
Applied
#1 lore raw
Quoted 4 lines · Randy.Dunlap

swiotlb: Fix gcc printk format warning on x86_64, OK for ia64:
arch/ia64/lib/swiotlb.c:351: warning: long unsigned int format, long long unsigned int arg (arg 2)

I applied to my tree for now, thanks, although Tony will likely want to push it.

-Andi