mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] i2c: fix printf format specifier
@ 2012-07-25  9:05 Uwe Kleine-König
  2012-07-26 10:42 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2012-07-25  9:05 UTC (permalink / raw)
  To: barebox

Use %u instead of %d for an u32 variable

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/i2c/i2c.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
index 9e52b86..b3c3c93 100644
--- a/drivers/i2c/i2c.c
+++ b/drivers/i2c/i2c.c
@@ -181,7 +181,7 @@ int i2c_read_reg(struct i2c_client *client, u32 addr, u8 *buf, u16 count)
 	msg->len = i;
 
 	status = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg));
-	dev_dbg(&client->dev, "%s: %zu@%d --> %d\n", __func__,
+	dev_dbg(&client->dev, "%s: %zu@%u --> %d\n", __func__,
 		count, addr, status);
 
 	if (status == ARRAY_SIZE(msg))
@@ -214,7 +214,7 @@ int i2c_write_reg(struct i2c_client *client, u32 addr, const u8 *buf, u16 count)
 	memcpy(msg->buf + i, buf, count);
 
 	status = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg));
-	dev_dbg(&client->dev, "%s: %u@%d --> %d\n", __func__,
+	dev_dbg(&client->dev, "%s: %u@%u --> %d\n", __func__,
 		count, addr, status);
 
 	if (status == ARRAY_SIZE(msg))
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: fix printf format specifier
  2012-07-25  9:05 [PATCH] i2c: fix printf format specifier Uwe Kleine-König
@ 2012-07-26 10:42 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-07-26 10:42 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox

On Wed, Jul 25, 2012 at 11:05:14AM +0200, Uwe Kleine-König wrote:
> Use %u instead of %d for an u32 variable
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Applied, thanks

  Sascha

> ---
>  drivers/i2c/i2c.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
> index 9e52b86..b3c3c93 100644
> --- a/drivers/i2c/i2c.c
> +++ b/drivers/i2c/i2c.c
> @@ -181,7 +181,7 @@ int i2c_read_reg(struct i2c_client *client, u32 addr, u8 *buf, u16 count)
>  	msg->len = i;
>  
>  	status = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg));
> -	dev_dbg(&client->dev, "%s: %zu@%d --> %d\n", __func__,
> +	dev_dbg(&client->dev, "%s: %zu@%u --> %d\n", __func__,
>  		count, addr, status);
>  
>  	if (status == ARRAY_SIZE(msg))
> @@ -214,7 +214,7 @@ int i2c_write_reg(struct i2c_client *client, u32 addr, const u8 *buf, u16 count)
>  	memcpy(msg->buf + i, buf, count);
>  
>  	status = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg));
> -	dev_dbg(&client->dev, "%s: %u@%d --> %d\n", __func__,
> +	dev_dbg(&client->dev, "%s: %u@%u --> %d\n", __func__,
>  		count, addr, status);
>  
>  	if (status == ARRAY_SIZE(msg))
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-26 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25  9:05 [PATCH] i2c: fix printf format specifier Uwe Kleine-König
2012-07-26 10:42 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox