* [PATCH] drivers: net: can: grcan: use devm_ioremap_resource()
@ 2013-05-13 15:27 Laurent Navet
2013-05-14 8:49 ` Andreas Larsson
2013-05-15 9:12 ` Marc Kleine-Budde
0 siblings, 2 replies; 4+ messages in thread
From: Laurent Navet @ 2013-05-13 15:27 UTC (permalink / raw)
To: wg, mkl; +Cc: linux-can, netdev, linux-kernel, Laurent Navet
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>
---
drivers/net/can/grcan.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c
index 17fbc7a..9e9d0d6 100644
--- a/drivers/net/can/grcan.c
+++ b/drivers/net/can/grcan.c
@@ -1683,10 +1683,9 @@ static int grcan_probe(struct platform_device *ofdev)
}
res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
- base = devm_request_and_ioremap(&ofdev->dev, res);
- if (!base) {
- dev_err(&ofdev->dev, "couldn't map IO resource\n");
- err = -EADDRNOTAVAIL;
+ base = devm_ioremap_resource(&ofdev->dev, res);
+ if (IS_ERR(base)) {
+ err = PTR_ERR(base);
goto exit_error;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: net: can: grcan: use devm_ioremap_resource()
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
1 sibling, 0 replies; 4+ messages in thread
From: Andreas Larsson @ 2013-05-14 8:49 UTC (permalink / raw)
To: Laurent Navet; +Cc: wg, mkl, linux-can, netdev, linux-kernel
On 2013-05-13 17:27, 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>
> ---
> drivers/net/can/grcan.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c
> index 17fbc7a..9e9d0d6 100644
> --- a/drivers/net/can/grcan.c
> +++ b/drivers/net/can/grcan.c
> @@ -1683,10 +1683,9 @@ static int grcan_probe(struct platform_device *ofdev)
> }
>
> res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
> - base = devm_request_and_ioremap(&ofdev->dev, res);
> - if (!base) {
> - dev_err(&ofdev->dev, "couldn't map IO resource\n");
> - err = -EADDRNOTAVAIL;
> + base = devm_ioremap_resource(&ofdev->dev, res);
> + if (IS_ERR(base)) {
> + err = PTR_ERR(base);
> goto exit_error;
> }
Acked-by: Andreas Larsson <andreas@gaisler.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: net: can: grcan: use devm_ioremap_resource()
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
1 sibling, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2013-05-15 9:12 UTC (permalink / raw)
To: Laurent Navet; +Cc: wg, linux-can, netdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
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.
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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drivers: net: can: grcan: use devm_ioremap_resource()
2013-05-15 9:12 ` Marc Kleine-Budde
@ 2013-05-16 11:50 ` Marc Kleine-Budde
0 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2013-05-16 11:50 UTC (permalink / raw)
To: Laurent Navet; +Cc: linux-can, linux-kernel
[-- 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 --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-16 11:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.