Re: [PATCH 03/14] drm/hisilicon: move to devm_platform_ioremap_resource() usage

From: Maxime Ripard
Date: Wed Jan 29 2025 - 10:33:34 EST


On Tue, Jan 28, 2025 at 05:29:27PM -0500, Anusha Srivatsa wrote:
> Replace platform_get_resource + devm_ioremap_resource
> with just devm_platform_ioremap_resource()
>
> Used Coccinelle to do this change. SmPl patch:
> @rule_1@
> identifier res;
> expression ioremap_res;
> identifier pdev;
> @@
> -struct resource *res;
> ...
> -res = platform_get_resource(pdev,...);
> -ioremap_res = devm_ioremap_resource(...);
> +ioremap_res = devm_platform_ioremap_resource(pdev,0);
>
> Cc: Xinliang Liu <xinliang.liu@xxxxxxxxxx>
> Cc: Tian Tao <tiantao6@xxxxxxxxxxxxx>
> Cc: Xinwei Kong <kong.kongxinwei@xxxxxxxxxxxxx>
> Cc: Sumit Semwal <sumit.semwal@xxxxxxxxxx>
> Cc: Yongqin Liu <yongqin.liu@xxxxxxxxxx>
> Cc: John Stultz <jstultz@xxxxxxxxxx>
>
> Signed-off-by: Anusha Srivatsa <asrivats@xxxxxxxxxx>

Reviewed-by: Maxime Ripard <mripard@xxxxxxxxxx>

Maxime

Attachment: signature.asc
Description: PGP signature