From: Jeff Garzik <jgarzik@pobox.com>
To: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: ata: rcar: use devm_ioremap_resource()
Date: Fri, 12 Apr 2013 06:23:57 -0400 [thread overview]
Message-ID: <5167E0BD.5080808@pobox.com> (raw)
In-Reply-To: <1365749477-22770-1-git-send-email-silviupopescu1990@gmail.com>
On 04/12/2013 02:51 AM, Silviu-Mihai Popescu wrote:
> Convert use of devm_request_and_ioremap() to the newly introduced
> devm_ioremap_resource() which provides more consistent error handling.
> This was found with coccinelle.
>
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
> ---
> drivers/ata/sata_rcar.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
> index caf33f6..8c51a3a 100644
> --- a/drivers/ata/sata_rcar.c
> +++ b/drivers/ata/sata_rcar.c
> @@ -799,9 +799,9 @@ static int sata_rcar_probe(struct platform_device *pdev)
>
> host->private_data = priv;
>
> - priv->base = devm_request_and_ioremap(&pdev->dev, mem);
> - if (!priv->base) {
> - ret = -EADDRNOTAVAIL;
> + priv->base = devm_ioremap_resource(&pdev->dev, mem);
> + if (IS_ERR(priv->base)) {
> + ret = PTR_ERR(priv->base);
> goto cleanup;
> }
>
>
See 2de1d5e159ccf317a9285a0dfaa6e4262500d7dd in libata-dev.git#upstream.
Jeff
prev parent reply other threads:[~2013-04-12 10:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 6:51 [PATCH] drivers: ata: rcar: use devm_ioremap_resource() Silviu-Mihai Popescu
2013-04-12 10:23 ` Jeff Garzik [this message]
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=5167E0BD.5080808@pobox.com \
--to=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=silviupopescu1990@gmail.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