Skip to contentSkip to conversation

remoteproc: imx_rproc: Use strstarts for "rsc-table" check

PATCH Applied Shenwei Wang 6 participants 10 messages Dec 8, 2025 – Dec 16, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: imx_rproc: Use strstarts for "rsc-table" check

The resource name may include an address suffix, for example:
rsc-table@1fff8000.

To handle such cases, use strstarts() instead of strcmp() when checking for "rsc-table".

---
 drivers/remoteproc/imx_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/imx_rproc.c +1 -1
index 3be8790c14a2..33f21ab24c92 100644
@@ -694,7 +694,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
 		}
 		priv->mem[b].sys_addr = res.start;
 		priv->mem[b].size = resource_size(&res);
-		if (!strcmp(res.name, "rsc-table"))
+		if (strstarts(res.name, "rsc-table"))
 			priv->rsc_table = priv->mem[b].cpu_addr;
 		b++;
 	}
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Shenwei Wang
Quoted 8 lines · Shenwei Wang

The resource name may include an address suffix, for example:
rsc-table@1fff8000.

To handle such cases, use strstarts() instead of strcmp() when checking for "rsc-table".

---

Quoted 19 lines
 drivers/remoteproc/imx_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/imx_rproc.c +1 -2
index 3be8790c14a2..33f21ab24c92 100644
@@ -694,7 +694,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
 		}
 		priv->mem[b].sys_addr = res.start;
 		priv->mem[b].size = resource_size(&res);
-		if (!strcmp(res.name, "rsc-table"))
+		if (strstarts(res.name, "rsc-table"))
 			priv->rsc_table = priv->mem[b].cpu_addr;
 		b++;
 	}
--

2.43.0

Reviewed-by on v1 1/1
#3 lore raw
In reply to Shenwei Wang
Quoted 7 lines · Shenwei Wang

The resource name may include an address suffix, for example:
rsc-table@1fff8000.

To handle such cases, use strstarts() instead of strcmp() when checking for "rsc-table".

Quoted 17 lines
---
  drivers/remoteproc/imx_rproc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/imx_rproc.c +1 -1
index 3be8790c14a2..33f21ab24c92 100644
@@ -694,7 +694,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
  		}
  		priv->mem[b].sys_addr = res.start;
  		priv->mem[b].size = resource_size(&res);
-		if (!strcmp(res.name, "rsc-table"))
+		if (strstarts(res.name, "rsc-table"))
  			priv->rsc_table = priv->mem[b].cpu_addr;
  		b++;
  	}
Signature · 2 lines
Thx and BRs,
Zhongqiu Han
maintainer
#4 lore raw
In reply to Shenwei Wang
Quoted 16 lines · Shenwei Wang

The resource name may include an address suffix, for example:
rsc-table@1fff8000.

To handle such cases, use strstarts() instead of strcmp() when checking for "rsc-table".

---
 drivers/remoteproc/imx_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/imx_rproc.c +0 -0
index 3be8790c14a2..33f21ab24c92 100644

drivers/remoteproc/imx_rproc.c static int imx_rproc_addr_init(struct imx_rproc *priv, · line 698

Quoted 6 lines
drivers/remoteproc/imx_rproc.c +1 -1
@@ -694,7 +694,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
 		}
 		priv->mem[b].sys_addr = res.start;
 		priv->mem[b].size = resource_size(&res);
-		if (!strcmp(res.name, "rsc-table"))
+		if (strstarts(res.name, "rsc-table"))
 			priv->rsc_table = priv->mem[b].cpu_addr;

Before applying this patch, I want to know how it ever worked before. How did DT with a suffix tested?

Quoted 5 lines
drivers/remoteproc/imx_rproc.c +0 -0
 		b++;
 	}
Signature · 1 line
2.43.0
#5 lore raw
Quoted 23 lines

Subject: Re: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc- table" check

Quoted 6 lines · Shenwei Wang

The resource name may include an address suffix, for example:
rsc-table@1fff8000.

To handle such cases, use strstarts() instead of strcmp() when checking for "rsc-table".

Quoted 7 lines
---
 drivers/remoteproc/imx_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/remoteproc/imx_rproc.c index

3be8790c14a2..33f21ab24c92

drivers/remoteproc/imx_rproc.c static int imx_rproc_addr_init(struct

Quoted 4 lines

100644

drivers/remoteproc/imx_rproc.c +0 -0
@@ -694,7 +694,7 @@ static int imx_rproc_addr_init(struct

imx_rproc *priv,

Quoted 9 lines

drivers/remoteproc/imx_rproc.c static int imx_rproc_addr_init(struct imx_rproc *priv, · line 698

Quoted 6 lines
drivers/remoteproc/imx_rproc.c +1 -1
 		}
 		priv->mem[b].sys_addr = res.start;
 		priv->mem[b].size = resource_size(&res);
-		if (!strcmp(res.name, "rsc-table"))
+		if (strstarts(res.name, "rsc-table"))
 			priv->rsc_table = priv->mem[b].cpu_addr;

Before applying this patch, I want to know how it ever worked before. How did DT with a suffix tested?

In Rob's v2 version[1], I gave my T-b in 2025-5-7, but I could not recall whether I did rpmsg test, seems I only did start/stop test from the issue Shenwei spotted.

[1] https://lore.kernel.org/linux-remoteproc/[email protected]/

Regards
Peng.

Quoted 6 lines
Quoted 6 lines
drivers/remoteproc/imx_rproc.c +0 -1
 		b++;
 	}
--

2.43.0

#6 lore raw
In reply to Shenwei Wang

Hi Shenwei,

Quoted 5 lines

Subject: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check

The resource name may include an address suffix, for example:
rsc-table@1fff8000.

device_node->name does not contain the suffix "@xyz". device_node->full_name contains the name and "@xyz"

Do you see the device_node->name is rsc-table@1fff8000 in your test?

Regards
Peng.

Quoted 26 lines

To handle such cases, use strstarts() instead of strcmp() when checking for "rsc-table".

---
 drivers/remoteproc/imx_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/remoteproc/imx_rproc.c index
3be8790c14a2..33f21ab24c92 100644

drivers/remoteproc/imx_rproc.c +1 -1
@@ -694,7 +694,7 @@ static int imx_rproc_addr_init(struct imx_rproc
 *priv,
 		}
 		priv->mem[b].sys_addr = res.start;
 		priv->mem[b].size = resource_size(&res);
-		if (!strcmp(res.name, "rsc-table"))
+		if (strstarts(res.name, "rsc-table"))
 			priv->rsc_table = priv->mem[b].cpu_addr;
 		b++;

}
--
2.43.0

#7 lore raw
Quoted 8 lines

Subject: RE: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc- table" check

Hi Shenwei,

Quoted 3 lines

Subject: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check

Quoted 7 lines
Quoted 2 lines

The resource name may include an address suffix, for example:
rsc-table@1fff8000.

device_node->name does not contain the suffix "@xyz". device_node->full_name contains the name and "@xyz"

Do you see the device_node->name is rsc-table@1fff8000 in your test?

Ignore above. I use an old tree, just see this change "remoteproc: Use of_reserved_mem_region_* functions for "memory-region" use res to replace device_node.

Regards
Peng.

Quoted 31 lines

Regards
Peng.

drivers/remoteproc/imx_rproc.c static int imx_rproc_addr_init(struct

Quoted 15 lines

To handle such cases, use strstarts() instead of strcmp() when checking for "rsc-table".

---
 drivers/remoteproc/imx_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/remoteproc/imx_rproc.c index
3be8790c14a2..33f21ab24c92 100644

drivers/remoteproc/imx_rproc.c +0 -0
@@ -694,7 +694,7 @@ static int imx_rproc_addr_init(struct

imx_rproc

Quoted 11 lines
drivers/remoteproc/imx_rproc.c +1 -1
 *priv,
 		}
 		priv->mem[b].sys_addr = res.start;
 		priv->mem[b].size = resource_size(&res);
-		if (!strcmp(res.name, "rsc-table"))
+		if (strstarts(res.name, "rsc-table"))
 			priv->rsc_table = priv->mem[b].cpu_addr;
 		b++;

}
--
2.43.0

maintainer Applied
#9 lore raw
In reply to Shenwei Wang
Quoted 11 lines · Shenwei Wang

The resource name may include an address suffix, for example:
rsc-table@1fff8000.

To handle such cases, use strstarts() instead of strcmp() when checking for "rsc-table".

---
 drivers/remoteproc/imx_rproc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied.

Thanks,
Mathieu

Quoted 16 lines
drivers/remoteproc/imx_rproc.c +1 -1
index 3be8790c14a2..33f21ab24c92 100644
@@ -694,7 +694,7 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
 		}
 		priv->mem[b].sys_addr = res.start;
 		priv->mem[b].size = resource_size(&res);
-		if (!strcmp(res.name, "rsc-table"))
+		if (strstarts(res.name, "rsc-table"))
 			priv->rsc_table = priv->mem[b].cpu_addr;
 		b++;
 	}
Signature · 1 line
2.43.0