linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] staging: dwc2: use devm_ioremap_resource()
  2013-05-02 11:23 [PATCH] staging: dwc2: use devm_ioremap_resource() Laurent Navet
@ 2013-05-02 11:22 ` Matthijs Kooijman
  2013-05-02 17:47   ` Paul Zimmerman
  0 siblings, 1 reply; 3+ messages in thread
From: Matthijs Kooijman @ 2013-05-02 11:22 UTC (permalink / raw)
  To: Laurent Navet; +Cc: paulz, gregkh, linux-usb, devel, linux-kernel

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@gmail.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@stdin.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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] staging: dwc2: use devm_ioremap_resource()
@ 2013-05-02 11:23 Laurent Navet
  2013-05-02 11:22 ` Matthijs Kooijman
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Navet @ 2013-05-02 11:23 UTC (permalink / raw)
  To: paulz, gregkh; +Cc: linux-usb, devel, linux-kernel, Laurent Navet

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@gmail.com>
---
 drivers/staging/dwc2/pci.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] staging: dwc2: use devm_ioremap_resource()
  2013-05-02 11:22 ` Matthijs Kooijman
@ 2013-05-02 17:47   ` Paul Zimmerman
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Zimmerman @ 2013-05-02 17:47 UTC (permalink / raw)
  To: Matthijs Kooijman, Laurent Navet; +Cc: gregkh, linux-usb, devel, linux-kernel

> From: Matthijs Kooijman [mailto:matthijs@stdin.nl]
> Sent: Thursday, May 02, 2013 4:22 AM
> 
> 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@gmail.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@stdin.nl>

Acked-by: Paul Zimmerman <paulz@synopsys.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-02 17:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02 11:23 [PATCH] staging: dwc2: use devm_ioremap_resource() Laurent Navet
2013-05-02 11:22 ` Matthijs Kooijman
2013-05-02 17:47   ` Paul Zimmerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).