diff mbox series

[3/4] remoteproc: imx_rproc: fix ignoring mapping vdev regions

Message ID 20210706142335.952858-3-aisheng.dong@nxp.com (mailing list archive)
State New, archived
Headers show
Series [1/4] remoteproc: fix the wrong default value of is_iomem | expand

Commit Message

Aisheng Dong July 6, 2021, 2:23 p.m. UTC
vdev regions are typically named vdev0buffer, vdev0ring0, vdev0ring1 and
etc. Change to strncmp to cover them all.

Fixes: 8f2d8961640f ("remoteproc: imx_rproc: ignore mapping vdev regions")
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
---
 drivers/remoteproc/imx_rproc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Peng Fan (OSS) July 7, 2021, 2:23 a.m. UTC | #1
> Subject: [PATCH 3/4] remoteproc: imx_rproc: fix ignoring mapping vdev
> regions
> 
> vdev regions are typically named vdev0buffer, vdev0ring0, vdev0ring1 and etc.
> Change to strncmp to cover them all.
> 
> Fixes: 8f2d8961640f ("remoteproc: imx_rproc: ignore mapping vdev regions")
> Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> ---
>  drivers/remoteproc/imx_rproc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/remoteproc/imx_rproc.c
> b/drivers/remoteproc/imx_rproc.c index 752f8ab258cf..12de153abb2d
> 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -578,8 +578,8 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
>  		struct resource res;
> 
>  		node = of_parse_phandle(np, "memory-region", a);
> -		/* Not map vdev region */
> -		if (!strcmp(node->name, "vdev"))
> +		/* Not map vdevbuffer, vdevring region */
> +		if (!strncmp(node->name, "vdev", strlen("vdev")))
>  			continue;
>  		err = of_address_to_resource(node, 0, &res);
>  		if (err) {

Reviewed-by: Peng Fan <peng.fan@nxp.com>

> --
> 2.25.1
diff mbox series

Patch

diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 752f8ab258cf..12de153abb2d 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -578,8 +578,8 @@  static int imx_rproc_addr_init(struct imx_rproc *priv,
 		struct resource res;
 
 		node = of_parse_phandle(np, "memory-region", a);
-		/* Not map vdev region */
-		if (!strcmp(node->name, "vdev"))
+		/* Not map vdevbuffer, vdevring region */
+		if (!strncmp(node->name, "vdev", strlen("vdev")))
 			continue;
 		err = of_address_to_resource(node, 0, &res);
 		if (err) {