linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: linux-iio@vger.kernel.org, Stefan Roese <sr@denx.de>
Subject: Re: [PATCH v2 1/3] staging:iio:spear_adc: Fix sparse warning
Date: Mon, 14 Oct 2013 23:14:26 +0100	[thread overview]
Message-ID: <525C6CC2.7050109@kernel.org> (raw)
In-Reply-To: <1381586159-31120-1-git-send-email-lars@metafoo.de>

On 10/12/13 14:55, Lars-Peter Clausen wrote:
> The driver is casting from one __iomem pointer to another. Make sure to include
> __iomem in the cast, otherwise sparse will complain with the following warning:
> 
> 	drivers/staging/iio/adc/spear_adc.c:321:18: warning: cast removes address space of expression
> 	drivers/staging/iio/adc/spear_adc.c:320:33: warning: incorrect type in assignment (different address spaces)
> 	drivers/staging/iio/adc/spear_adc.c:320:33:    expected struct adc_regs_spear3xx [noderef] <asn:2>*adc_base_spear3xx
> 	drivers/staging/iio/adc/spear_adc.c:320:33:    got struct adc_regs_spear3xx *<noident>
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Stefan Roese <sr@denx.de>
Applied to the togreg branch of iio.git

Seems to have cleaned up that warning nicely.

Thanks Lars,


> ---
> New in v2
> ---
>  drivers/staging/iio/adc/spear_adc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/adc/spear_adc.c b/drivers/staging/iio/adc/spear_adc.c
> index fc99598..e6555b6 100644
> --- a/drivers/staging/iio/adc/spear_adc.c
> +++ b/drivers/staging/iio/adc/spear_adc.c
> @@ -318,7 +318,7 @@ static int spear_adc_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  	}
>  	info->adc_base_spear3xx =
> -		(struct adc_regs_spear3xx *)info->adc_base_spear6xx;
> +		(struct adc_regs_spear3xx __iomem *)info->adc_base_spear6xx;
>  
>  	info->clk = clk_get(dev, NULL);
>  	if (IS_ERR(info->clk)) {
> 

      parent reply	other threads:[~2013-10-14 21:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-12 13:55 [PATCH v2 1/3] staging:iio:spear_adc: Fix sparse warning Lars-Peter Clausen
2013-10-12 13:55 ` [PATCH v2 2/3] staging:iio:mxs-lradc: Select STMP_DEVICE Lars-Peter Clausen
2013-10-14 22:14   ` Jonathan Cameron
2013-10-12 13:55 ` [PATCH v2 3/3] staging:iio: Allow to build SoC specific drivers when COMPILE_TEST is set Lars-Peter Clausen
2013-10-14 22:15   ` Jonathan Cameron
2013-10-14 22:14 ` Jonathan Cameron [this message]

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=525C6CC2.7050109@kernel.org \
    --to=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=sr@denx.de \
    /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).