linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Dooks <ben-i2c@fluff.org>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: ben-linux@fluff.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c-iop3xx: add iomem annotation
Date: Fri, 3 Dec 2010 01:59:14 +0000	[thread overview]
Message-ID: <20101203015914.GC20097@trinity.fluff.org> (raw)
In-Reply-To: <1290960420-7484-1-git-send-email-aaro.koskinen@iki.fi>

On Sun, Nov 28, 2010 at 06:07:00PM +0200, Aaro Koskinen wrote:
> Eliminate unnecessary casts and the following sparse warnings:
> 
> 	drivers/i2c/busses/i2c-iop3xx.c:65:9: warning: incorrect type in argument 1 (different base types)
> 	drivers/i2c/busses/i2c-iop3xx.c:65:9:    expected void const volatile [noderef] <asn:2>*<noident>
> 	drivers/i2c/busses/i2c-iop3xx.c:65:9:    got unsigned int
> 
> 	[ the previous warning is repeated 18 times ]
> 
> 	drivers/i2c/busses/i2c-iop3xx.c:456:33: warning: cast removes address space of expression
> 
> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
> ---
>  drivers/i2c/busses/i2c-iop3xx.c |    6 +++---
>  drivers/i2c/busses/i2c-iop3xx.h |    2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
> index 112c61f..f09c931 100644
> --- a/drivers/i2c/busses/i2c-iop3xx.c
> +++ b/drivers/i2c/busses/i2c-iop3xx.c
> @@ -409,7 +409,7 @@ iop3xx_i2c_remove(struct platform_device *pdev)
>  		IOP3XX_ICR_RXFULL_IE | IOP3XX_ICR_TXEMPTY_IE);
>  	__raw_writel(cr, adapter_data->ioaddr + CR_OFFSET);
>  
> -	iounmap((void __iomem*)adapter_data->ioaddr);
> +	iounmap(adapter_data->ioaddr);
>  	release_mem_region(res->start, IOP3XX_I2C_IO_SIZE);
>  	kfree(adapter_data);
>  	kfree(padapter);
> @@ -453,7 +453,7 @@ iop3xx_i2c_probe(struct platform_device *pdev)
>  	/* set the adapter enumeration # */
>  	adapter_data->id = i2c_id++;
>  
> -	adapter_data->ioaddr = (u32)ioremap(res->start, IOP3XX_I2C_IO_SIZE);
> +	adapter_data->ioaddr = ioremap(res->start, IOP3XX_I2C_IO_SIZE);
>  	if (!adapter_data->ioaddr) {
>  		ret = -ENOMEM;
>  		goto release_region;
> @@ -498,7 +498,7 @@ iop3xx_i2c_probe(struct platform_device *pdev)
>  	return 0;
>  
>  unmap:
> -	iounmap((void __iomem*)adapter_data->ioaddr);
> +	iounmap(adapter_data->ioaddr);
>  
>  release_region:
>  	release_mem_region(res->start, IOP3XX_I2C_IO_SIZE);
> diff --git a/drivers/i2c/busses/i2c-iop3xx.h b/drivers/i2c/busses/i2c-iop3xx.h
> index 8485861..a63b9f1 100644
> --- a/drivers/i2c/busses/i2c-iop3xx.h
> +++ b/drivers/i2c/busses/i2c-iop3xx.h
> @@ -97,7 +97,7 @@
>  #define	IOP3XX_I2C_IO_SIZE	0x18
>  
>  struct i2c_algo_iop3xx_data {
> -	u32 ioaddr;
> +	char __iomem *ioaddr;

probably should be changed to void if possible without creating extra
warnings.

-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.


  parent reply	other threads:[~2010-12-03  1:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-28 16:07 [PATCH] i2c-iop3xx: add iomem annotation Aaro Koskinen
2010-11-29 10:13 ` Marc Kleine-Budde
2010-12-03  1:59 ` Ben Dooks [this message]
2010-12-03  5:51   ` Aaro Koskinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101203015914.GC20097@trinity.fluff.org \
    --to=ben-i2c@fluff.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=ben-linux@fluff.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).