From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Yangtao Li <frank.li@vivo.com>, Damien Le Moal <dlemoal@kernel.org>
Cc: <linux-ide@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/8] ata: sata_rcar: Convert to devm_platform_ioremap_resource()
Date: Fri, 7 Jul 2023 00:10:30 +0300 [thread overview]
Message-ID: <845da26d-0369-ba58-fb53-d37e6eac39a3@omp.ru> (raw)
In-Reply-To: <20230706124239.23366-5-frank.li@vivo.com>
On 7/6/23 3:42 PM, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
> drivers/ata/sata_rcar.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
> index 34790f15c1b8..63f8337c2a98 100644
> --- a/drivers/ata/sata_rcar.c
> +++ b/drivers/ata/sata_rcar.c
> @@ -861,15 +861,11 @@ static int sata_rcar_probe(struct platform_device *pdev)
> struct device *dev = &pdev->dev;
> struct ata_host *host;
> struct sata_rcar_priv *priv;
> - struct resource *mem;
> - int irq;
> - int ret = 0;
> + int irq, ret;
This unneeded init of ret should be in a separate patch.
>
> irq = platform_get_irq(pdev, 0);
> if (irq < 0)
> return irq;
> - if (!irq)
> - return -EINVAL;
This is a separate issue too. I thought I've removed this myself
but apparently not, the commit [1] took shamefully long time to merge... :-(
[...]
> @@ -890,8 +886,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
>
> host->private_data = priv;
>
> - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - priv->base = devm_ioremap_resource(dev, mem);
> + priv->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(priv->base)) {
> ret = PTR_ERR(priv->base);
> goto err_pm_put;
The (documented) change looks OK.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce753ad1549cbe9ccaea4c06a1f5fa47432c8289
MBR, Seregy
next prev parent reply other threads:[~2023-07-06 21:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 12:42 [PATCH 1/8] ata: ahci_octeon: " Yangtao Li
2023-07-06 12:42 ` [PATCH 2/8] ata: ahci_seattle: " Yangtao Li
2023-07-06 12:42 ` [PATCH 3/8] ata: ahci_xgene: " Yangtao Li
2023-07-06 12:42 ` [PATCH 4/8] ahci: tegra: " Yangtao Li
2023-07-06 23:35 ` Damien Le Moal
2023-07-06 12:42 ` [PATCH 5/8] ata: sata_rcar: " Yangtao Li
2023-07-06 13:05 ` Geert Uytterhoeven
2023-07-06 21:10 ` Sergey Shtylyov [this message]
2023-07-06 23:37 ` Damien Le Moal
2023-07-06 12:42 ` [PATCH 6/8] pata: ixp4xx: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-06 23:39 ` Damien Le Moal
2023-07-07 18:58 ` Sergey Shtylyov
2023-07-06 12:42 ` [PATCH 7/8] ata: pata_ftide010: " Yangtao Li
2023-07-06 18:02 ` Linus Walleij
2023-07-06 21:19 ` Sergey Shtylyov
2023-07-06 12:42 ` [PATCH 8/8] pata: imx: " Yangtao Li
2023-07-06 21:21 ` Sergey Shtylyov
2023-07-06 23:40 ` Damien Le Moal
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=845da26d-0369-ba58-fb53-d37e6eac39a3@omp.ru \
--to=s.shtylyov@omp.ru \
--cc=dlemoal@kernel.org \
--cc=frank.li@vivo.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
/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®