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, 2 May 2013 13:22:29 +0200
From:	Matthijs Kooijman <matthijs@...in.nl>
To:	Laurent Navet <laurent.navet@...il.com>
Cc:	paulz@...opsys.com, gregkh@...uxfoundation.org,
	linux-usb@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: dwc2: use devm_ioremap_resource()

Hi Laurent,

On Thu, May 02, 2013 at 01:23:17PM +0200, Laurent Navet wrote:
> Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.
> 
> Found with coccicheck and this semantic patch:
>  scripts/coccinelle/api/devm_request_and_ioremap.cocci.
> 
> Signed-off-by: Laurent Navet <laurent.navet@...il.com>
> ---
>  drivers/staging/dwc2/pci.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
Patch looks good, I had a bit-for-bit identical patch in my queue here
as well :-)

Reviewed-by: Matthijs Kooijman <matthijs@...in.nl>

Gr.

Matthijs

> diff --git a/drivers/staging/dwc2/pci.c b/drivers/staging/dwc2/pci.c
> index 69c65eb..407e021 100644
> --- a/drivers/staging/dwc2/pci.c
> +++ b/drivers/staging/dwc2/pci.c
> @@ -134,9 +134,9 @@ static int dwc2_driver_probe(struct pci_dev *dev,
>  	pci_set_power_state(dev, PCI_D0);
>  
>  	hsotg->dev = &dev->dev;
> -	hsotg->regs = devm_request_and_ioremap(&dev->dev, &dev->resource[0]);
> -	if (!hsotg->regs)
> -		return -ENOMEM;
> +	hsotg->regs = devm_ioremap_resource(&dev->dev, &dev->resource[0]);
> +	if (IS_ERR(hsotg->regs))
> +		return PTR_ERR(hsotg->regs);
>  
>  	dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n",
>  		(unsigned long)pci_resource_start(dev, 0), hsotg->regs);
> -- 
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
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