All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Laurent Navet <laurent.navet@gmail.com>
Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: net: can: grcan: use devm_ioremap_resource()
Date: Thu, 16 May 2013 13:50:00 +0200	[thread overview]
Message-ID: <5194C7E8.4060804@pengutronix.de> (raw)
In-Reply-To: <51935176.7020601@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1520 bytes --]

On 05/15/2013 11:12 AM, Marc Kleine-Budde wrote:
> On 05/13/2013 05:27 PM, Laurent Navet wrote:
>> Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.
>> dev_err() message is no more needed since it's already displayed in
>> devm_ioremap_resource().
>>
>> Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
> 
> Tnx, applied to linux-can-next.

The "IS_ERR(base)" ...

> +	base = devm_ioremap_resource(&ofdev->dev, res);
> +	if (IS_ERR(base)) {
> +		err = PTR_ERR(base);
>  		goto exit_error;
>  	}

... introduces this sparse warning:

> drivers/net/can/grcan.c:1687:20: warning: incorrect type in argument 1 (different address spaces)
> drivers/net/can/grcan.c:1687:20:    expected void const *ptr
> drivers/net/can/grcan.c:1687:20:    got void [noderef] <asn:2>*[assigned] base
> drivers/net/can/grcan.c:1688:31: warning: incorrect type in argument 1 (different address spaces)
> drivers/net/can/grcan.c:1688:31:    expected void const *ptr
> drivers/net/can/grcan.c:1688:31:    got void [noderef] <asn:2>*[assigned] base

I think it's the __iomem annotation of the void pointer that
devm_ioremap_resource() returns. Is there a clever way to improve IS_ERR
and PTR_ERR?

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

      reply	other threads:[~2013-05-16 11:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 15:27 [PATCH] drivers: net: can: grcan: use devm_ioremap_resource() Laurent Navet
2013-05-14  8:49 ` Andreas Larsson
2013-05-15  9:12 ` Marc Kleine-Budde
2013-05-16 11:50   ` Marc Kleine-Budde [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=5194C7E8.4060804@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=laurent.navet@gmail.com \
    --cc=linux-can@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.