Patchwork [-next] i2c: fix i2c-ismt.c printk format warning

login
register
mail settings
Submitter Randy Dunlap
Date Feb. 15, 2013, 6:51 p.m.
Message ID <511E83BC.3050007@infradead.org>
Download mbox | patch
Permalink /patch/220804/
State Accepted
Headers show

Comments

Randy Dunlap - Feb. 15, 2013, 6:51 p.m.
From: Randy Dunlap <rdunlap@infradead.org>

Fix printk format warning.  dma_addr_t can be 32-bit or 64-bit,
so cast it to long long for printing.  This also matches the
printk format specifier that is already used.

drivers/i2c/busses/i2c-ismt.c:532:3: warning: format '%llX' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' [-Wformat]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc:	Bill E. Brown <bill.e.brown@intel.com>
Cc:	Jean Delvare <khali@linux-fr.org>
Cc:	Seth Heasley <seth.heasley@intel.com>
Cc:	Neil Horman <nhorman@tuxdriver.com>
Cc:	Wolfram Sang <w.sang@pengutronix.de>
Cc:	linux-i2c@vger.kernel.org
---
 drivers/i2c/busses/i2c-ismt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang - Feb. 15, 2013, 7:48 p.m.
On Fri, Feb 15, 2013 at 10:51:40AM -0800, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> Fix printk format warning.  dma_addr_t can be 32-bit or 64-bit,
> so cast it to long long for printing.  This also matches the
> printk format specifier that is already used.
> 
> drivers/i2c/busses/i2c-ismt.c:532:3: warning: format '%llX' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' [-Wformat]
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

Thanks, applied to next.

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- linux-next-20130215.orig/drivers/i2c/busses/i2c-ismt.c
+++ linux-next-20130215/drivers/i2c/busses/i2c-ismt.c
@@ -530,7 +530,7 @@  static int ismt_access(struct i2c_adapte
 		}
 
 		dev_dbg(dev, " dma_addr = 0x%016llX\n",
-			dma_addr);
+			(unsigned long long)dma_addr);
 
 		desc->dptr_low = lower_32_bits(dma_addr);
 		desc->dptr_high = upper_32_bits(dma_addr);