From: Lars-Peter Clausen <lars@metafoo.de>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "open list:STAGING - INDUSTR..." <linux-iio@vger.kernel.org>,
open list:STAGING SUBSYSTEM <devel@driverdev.osuosl.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: iio: adc: mxs-lradc.c: sparse warning of incorrect type
Date: Thu, 04 Sep 2014 18:50:05 +0200 [thread overview]
Message-ID: <5408983D.30002@metafoo.de> (raw)
In-Reply-To: <1409849142-12185-1-git-send-email-sudipm.mukherjee@gmail.com>
On 09/04/2014 06:45 PM, Sudip Mukherjee wrote:
> fixed sparse warning : incorrect type in argument 1
> (different address spaces)
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
> drivers/staging/iio/adc/mxs-lradc.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
> index 468327f..d8d1fe1 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -1545,9 +1545,12 @@ static int mxs_lradc_probe(struct platform_device *pdev)
> /* Grab the memory area */
> iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> lradc->dev = &pdev->dev;
> - lradc->base = devm_ioremap_resource(dev, iores);
> - if (IS_ERR(lradc->base))
> - return PTR_ERR(lradc->base);
> + void *tempptr;
> +
> + tempptr = devm_ioremap_resource(dev, iores);
> + if (IS_ERR(tempptr))
> + return PTR_ERR(tempptr);
> + lradc->base = tempptr;
This makes no sense at all... devm_ioremap_resource() returns a iomem
pointer lrdac->base is a iomem pointer.
Please make sure that you have the latest version of sparse installed on
your system.
>
> lradc->clk = devm_clk_get(&pdev->dev, NULL);
> if (IS_ERR(lradc->clk)) {
>
next prev parent reply other threads:[~2014-09-04 16:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 16:45 [PATCH] staging: iio: adc: mxs-lradc.c: sparse warning of incorrect type Sudip Mukherjee
2014-09-04 16:50 ` Lars-Peter Clausen [this message]
2014-09-04 17:12 ` Sudip Mukherjee
2014-09-04 17:16 ` Lars-Peter Clausen
2014-09-05 6:39 ` Sudip Mukherjee
2014-09-04 17:00 ` Sudip Mukherjee
2014-09-05 9:34 ` Dan Carpenter
2014-09-05 9:47 ` Sudip Mukherjee
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=5408983D.30002@metafoo.de \
--to=lars@metafoo.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=sudipm.mukherjee@gmail.com \
/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).