lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 16 May 2013 13:50:00 +0200
From:	Marc Kleine-Budde <mkl@...gutronix.de>
To:	Laurent Navet <laurent.navet@...il.com>
CC:	linux-can@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: net: can: grcan: use devm_ioremap_resource()

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@...il.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   |


Download attachment "signature.asc" of type "application/pgp-signature" (264 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ