From: Matthijs Kooijman <matthijs@stdin.nl>
To: Laurent Navet <laurent.navet@gmail.com>
Cc: paulz@synopsys.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: dwc2: use devm_ioremap_resource()
Date: Thu, 2 May 2013 13:22:29 +0200 [thread overview]
Message-ID: <20130502112228.GI13691@login.drsnuggles.stderr.nl> (raw)
In-Reply-To: <1367493798-32354-1-git-send-email-laurent.navet@gmail.com>
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
next prev parent reply other threads:[~2013-05-02 11:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 11:23 Laurent Navet
2013-05-02 11:22 ` Matthijs Kooijman [this message]
2013-05-02 17:47 ` Paul Zimmerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130502112228.GI13691@login.drsnuggles.stderr.nl \
--to=matthijs@stdin.nl \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.navet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=paulz@synopsys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®