public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ata: ep93xx: use devm_platform_get_and_ioremap_resource()
@ 2022-11-11  8:47 ye.xingchen
  2022-11-11 12:30 ` Sergey Shtylyov
  2022-11-12  2:11 ` Damien Le Moal
  0 siblings, 2 replies; 3+ messages in thread
From: ye.xingchen @ 2022-11-11  8:47 UTC (permalink / raw)
  To: s.shtylyov; +Cc: damien.lemoal, linux-ide, linux-kernel, chi.minghao

From: Minghao Chi <chi.minghao@zte.com.cn>

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/ata/pata_ep93xx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
index 6c75a22db12b..47845d920075 100644
--- a/drivers/ata/pata_ep93xx.c
+++ b/drivers/ata/pata_ep93xx.c
@@ -931,8 +931,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
 		goto err_rel_gpio;
 	}

-	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	ide_base = devm_ioremap_resource(&pdev->dev, mem_res);
+	ide_base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
 	if (IS_ERR(ide_base)) {
 		err = PTR_ERR(ide_base);
 		goto err_rel_gpio;
-- 
2.25.1

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

* Re: [PATCH] ata: ep93xx: use devm_platform_get_and_ioremap_resource()
  2022-11-11  8:47 [PATCH] ata: ep93xx: use devm_platform_get_and_ioremap_resource() ye.xingchen
@ 2022-11-11 12:30 ` Sergey Shtylyov
  2022-11-12  2:11 ` Damien Le Moal
  1 sibling, 0 replies; 3+ messages in thread
From: Sergey Shtylyov @ 2022-11-11 12:30 UTC (permalink / raw)
  To: ye.xingchen; +Cc: damien.lemoal, linux-ide, linux-kernel, chi.minghao

Hello!

On 11/11/22 11:47 AM, ye.xingchen@zte.com.cn wrote:

> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>

[...]

MBR, Sergey

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

* Re: [PATCH] ata: ep93xx: use devm_platform_get_and_ioremap_resource()
  2022-11-11  8:47 [PATCH] ata: ep93xx: use devm_platform_get_and_ioremap_resource() ye.xingchen
  2022-11-11 12:30 ` Sergey Shtylyov
@ 2022-11-12  2:11 ` Damien Le Moal
  1 sibling, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2022-11-12  2:11 UTC (permalink / raw)
  To: ye.xingchen, s.shtylyov; +Cc: linux-ide, linux-kernel, chi.minghao

On 11/11/22 17:47, ye.xingchen@zte.com.cn wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
>  drivers/ata/pata_ep93xx.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c
> index 6c75a22db12b..47845d920075 100644
> --- a/drivers/ata/pata_ep93xx.c
> +++ b/drivers/ata/pata_ep93xx.c
> @@ -931,8 +931,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
>  		goto err_rel_gpio;
>  	}
> 
> -	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	ide_base = devm_ioremap_resource(&pdev->dev, mem_res);
> +	ide_base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res);
>  	if (IS_ERR(ide_base)) {
>  		err = PTR_ERR(ide_base);
>  		goto err_rel_gpio;

Applied to for-6.2 with the title chaged to "ata: pata_ep93xx: use...".
Thanks !

-- 
Damien Le Moal
Western Digital Research


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

end of thread, other threads:[~2022-11-12  2:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-11  8:47 [PATCH] ata: ep93xx: use devm_platform_get_and_ioremap_resource() ye.xingchen
2022-11-11 12:30 ` Sergey Shtylyov
2022-11-12  2:11 ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox