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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 31 Jan 2013 09:12:18 +0100
From:	Thierry Reding <thierry.reding@...onic-design.de>
To:	Sachin Kamat <sachin.kamat@...aro.org>
Cc:	linux-kernel@...r.kernel.org, Vinod Koul <vinod.koul@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH 1/1] dma: pl330: Convert to devm_ioremap_resource()

On Thu, Jan 31, 2013 at 12:37:04PM +0530, Sachin Kamat wrote:
> Use the newly introduced devm_ioremap_resource() instead of
> devm_request_and_ioremap() which provides more consistent error handling.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@...aro.org>
> Cc: Vinod Koul <vinod.koul@...el.com>
> Cc: Thierry Reding <thierry.reding@...onic-design.de>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> ---
> This change is based against linux-next tree (20130128).
> This change however introduces the followign sparse warning:
> drivers/dma/pl330.c:2883:22: warning: incorrect type in argument 1 (different address spaces)
> drivers/dma/pl330.c:2883:22:    expected void const *ptr
> drivers/dma/pl330.c:2883:22:    got void [noderef] <asn:2>*base
> drivers/dma/pl330.c:2884:34: warning: incorrect type in argument 1 (different address spaces)
> drivers/dma/pl330.c:2884:34:    expected void const *ptr
> drivers/dma/pl330.c:2884:34:    got void [noderef] <asn:2>*base
> ---
>  drivers/dma/pl330.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index 316a43e..142fe4d 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -25,6 +25,7 @@
>  #include <linux/amba/pl330.h>
>  #include <linux/scatterlist.h>
>  #include <linux/of.h>
> +#include <linux/err.h>
>  
>  #include "dmaengine.h"
>  #define PL330_MAX_CHAN		8
> @@ -2878,9 +2879,9 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
>  	pi->mcbufsz = pdat ? pdat->mcbuf_sz : 0;
>  
>  	res = &adev->res;
> -	pi->base = devm_request_and_ioremap(&adev->dev, res);
> -	if (!pi->base)
> -		return -ENXIO;
> +	pi->base = devm_ioremap_resource(&adev->dev, res);
> +	if (IS_ERR(pi->base))
> +		return PTR_ERR(pi->base);
>  
>  	amba_set_drvdata(adev, pdmac);
>  

Reviewed-by: Thierry Reding <thierry.reding@...onic-design.de>

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ