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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 29 Jan 2013 15:11:05 +0200
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	Thierry Reding <thierry.reding@...onic-design.de>
Cc:	linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Arnd Bergmann <arnd@...db.de>,
	Wolfram Sang <w.sang@...gutronix.de>,
	Vinod Koul <vinod.koul@...el.com>
Subject: Re: [PATCH 07/33] dma: Convert to devm_ioremap_resource()

On Mon, Jan 21, 2013 at 12:09 PM, Thierry Reding
<thierry.reding@...onic-design.de> wrote:
> Convert all uses of devm_request_and_ioremap() to the newly introduced
> devm_ioremap_resource() which provides more consistent error handling.
>
> devm_ioremap_resource() provides its own error messages so all explicit
> error messages can be removed from the failure code paths.
>
> Signed-off-by: Thierry Reding <thierry.reding@...onic-design.de>
> Cc: Vinod Koul <vinod.koul@...el.com>
> ---
>  drivers/dma/dw_dmac.c         |  7 ++++---
>  drivers/dma/imx-dma.c         |  7 ++++---
>  drivers/dma/mmp_pdma.c        |  7 ++++---
>  drivers/dma/mmp_tdma.c        |  7 ++++---
>  drivers/dma/tegra20-apb-dma.c | 10 ++++------
>  5 files changed, 20 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
> index 3e8ba02..b33d1f6 100644
> --- a/drivers/dma/dw_dmac.c
> +++ b/drivers/dma/dw_dmac.c
> @@ -14,6 +14,7 @@
>  #include <linux/delay.h>
>  #include <linux/dmaengine.h>
>  #include <linux/dma-mapping.h>
> +#include <linux/err.h>
>  #include <linux/init.h>
>  #include <linux/interrupt.h>
>  #include <linux/io.h>
> @@ -1489,9 +1490,9 @@ static int dw_probe(struct platform_device *pdev)
>         if (irq < 0)
>                 return irq;
>
> -       regs = devm_request_and_ioremap(&pdev->dev, io);
> -       if (!regs)
> -               return -EBUSY;
> +       regs = devm_ioremap_resource(&pdev->dev, io);
> +       if (IS_ERR(regs))
> +               return PTR_ERR(regs);

Do you concern that change makes sparse crazy?

drivers/dma/dw_dmac.c:1690:20: warning: incorrect type in argument 1
(different address spaces)
drivers/dma/dw_dmac.c:1690:20:    expected void const *ptr
drivers/dma/dw_dmac.c:1690:20:    got void [noderef] <asn:2>*[assigned] regs
drivers/dma/dw_dmac.c:1691:32: warning: incorrect type in argument 1
(different address spaces)
drivers/dma/dw_dmac.c:1691:32:    expected void const *ptr
drivers/dma/dw_dmac.c:1691:32:    got void [noderef] <asn:2>*[assigned] regs


-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ