All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Zhang Zekun <zhangzekun11@huawei.com>,
	cassel@kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] ata: libata: Use devm_platform_ioremap_resource_byname() helper function
Date: Tue, 27 Aug 2024 16:53:35 +0900	[thread overview]
Message-ID: <f405e1fc-26e2-4846-aed8-d0fdea3efb78@kernel.org> (raw)
In-Reply-To: <20240827072005.45181-1-zhangzekun11@huawei.com>

On 8/27/24 16:20, Zhang Zekun wrote:
> platform_get_resource_byname() and devm_ioremap_resource() can be
> replaced by devm_platform_ioremap_resource_byname(), which can
> simplify the code logic a bit, No functional change here.
> 
> Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>

Looks good, but since this modifies the ahci_brcm driver, the patch title should be:

ata: ahci_brcm: Use devm_platform_ioremap_resource_byname() helper function

Please resend with that fixed.

> ---
>  drivers/ata/ahci_brcm.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c
> index 70c3a33eee6f..2f16524c2526 100644
> --- a/drivers/ata/ahci_brcm.c
> +++ b/drivers/ata/ahci_brcm.c
> @@ -437,7 +437,6 @@ static int brcm_ahci_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct brcm_ahci_priv *priv;
>  	struct ahci_host_priv *hpriv;
> -	struct resource *res;
>  	int ret;
>  
>  	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> @@ -451,8 +450,7 @@ static int brcm_ahci_probe(struct platform_device *pdev)
>  	priv->version = (unsigned long)of_id->data;
>  	priv->dev = dev;
>  
> -	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl");
> -	priv->top_ctrl = devm_ioremap_resource(dev, res);
> +	priv->top_ctrl = devm_platform_ioremap_resource_byname(pdev, "top-ctrl");
>  	if (IS_ERR(priv->top_ctrl))
>  		return PTR_ERR(priv->top_ctrl);
>  

-- 
Damien Le Moal
Western Digital Research


      reply	other threads:[~2024-08-27  7:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  7:20 [PATCH] ata: libata: Use devm_platform_ioremap_resource_byname() helper function Zhang Zekun
2024-08-27  7:53 ` Damien Le Moal [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=f405e1fc-26e2-4846-aed8-d0fdea3efb78@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=cassel@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=zhangzekun11@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.