[i2c] [PATCH] i2c-s3c2410.c: Fix build warning (try 2)

Jean Delvare khali at linux-fr.org
Fri May 11 10:32:50 CEST 2007


Hi Arnaud,

On Thu, 10 May 2007 21:57:10 +0200, Arnaud Patard (Rtp) wrote:
> 
> Fix for the following build warning :
> CC      drivers/i2c/busses/i2c-s3c2410.o drivers/i2c/busses/i2c-s3c2410.c: In function 's3c24xx_i2c_probe':
> drivers/i2c/busses/i2c-s3c2410.c:839: warning: format '%ld' expects type 'long int', but argument 4 has type 'resource_size_t'
> 
> Signed-off-by: Arnaud Patard <arnaud.patard at rtp-net.org>
> ---

> [PATCH] i2c-s3c2410.c: Fix build warning
> 
> 
> Fix for the following build warning :
>   CC      drivers/i2c/busses/i2c-s3c2410.o
>   drivers/i2c/busses/i2c-s3c2410.c: In function 's3c24xx_i2c_probe':
>   drivers/i2c/busses/i2c-s3c2410.c:839: warning: format '%ld' expects type 'long int', but argument 4 has type 'resource_size_t'
> 
> Signed-off-by: Arnaud Patard <arnaud.patard at rtp-net.org>
> ---
> ---
>  drivers/i2c/busses/i2c-s3c2410.c |    2 	1 +	1 -	0 !
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6/drivers/i2c/busses/i2c-s3c2410.c
> ===================================================================
> --- linux-2.6.orig/drivers/i2c/busses/i2c-s3c2410.c	2007-05-10 20:58:15.000000000 +0200
> +++ linux-2.6/drivers/i2c/busses/i2c-s3c2410.c	2007-05-10 21:43:40.000000000 +0200
> @@ -830,7 +830,7 @@ static int s3c24xx_i2c_probe(struct plat
>  
>  	i2c->irq = res;
>  		
> -	dev_dbg(&pdev->dev, "irq resource %p (%ld)\n", res, res->start);
> +	dev_dbg(&pdev->dev, "irq resource %p (%ld)\n", res, (unsigned long)res->start);
>  
>  	ret = i2c_add_adapter(&i2c->adap);
>  	if (ret < 0) {

Yes, except that this should then be %lu rather than %ld (even though I
don't expect this to make a difference in practice), and that the line
is too long and should be folded to fit in 80 columns. I fixed both
myself, no need to resend.

Thanks,
-- 
Jean Delvare



More information about the i2c mailing list