* [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check
@ 2025-12-08 23:33 Shenwei Wang
2025-12-09 12:36 ` Daniel Baluta
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: Shenwei Wang @ 2025-12-08 23:33 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer
Cc: Pengutronix Kernel Team, Fabio Estevam, linux-remoteproc, imx,
linux-arm-kernel, linux-kernel, linux-imx, 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".
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
---
drivers/remoteproc/imx_rproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 3be8790c14a2..33f21ab24c92 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check
2025-12-08 23:33 [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check Shenwei Wang
@ 2025-12-09 12:36 ` Daniel Baluta
2025-12-09 16:05 ` Frank Li
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Daniel Baluta @ 2025-12-09 12:36 UTC (permalink / raw)
To: Shenwei Wang
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, linux-remoteproc, imx,
linux-arm-kernel, linux-kernel, linux-imx
On Tue, Dec 9, 2025 at 1:33 AM Shenwei Wang <shenwei.wang@nxp.com> wrote:
>
> 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".
>
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Good catch.
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check
2025-12-08 23:33 [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check Shenwei Wang
2025-12-09 12:36 ` Daniel Baluta
@ 2025-12-09 16:05 ` Frank Li
2025-12-11 6:20 ` Zhongqiu Han
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Frank Li @ 2025-12-09 16:05 UTC (permalink / raw)
To: Shenwei Wang
Cc: Bjorn Andersson, Mathieu Poirier, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, linux-remoteproc, imx,
linux-arm-kernel, linux-kernel, linux-imx
On Mon, Dec 08, 2025 at 05:33:02PM -0600, Shenwei Wang wrote:
> 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".
>
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/remoteproc/imx_rproc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index 3be8790c14a2..33f21ab24c92 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -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
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check
2025-12-08 23:33 [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check Shenwei Wang
2025-12-09 12:36 ` Daniel Baluta
2025-12-09 16:05 ` Frank Li
@ 2025-12-11 6:20 ` Zhongqiu Han
2025-12-15 2:19 ` Mathieu Poirier
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Zhongqiu Han @ 2025-12-11 6:20 UTC (permalink / raw)
To: Shenwei Wang, Bjorn Andersson, Mathieu Poirier, Shawn Guo,
Sascha Hauer
Cc: Pengutronix Kernel Team, Fabio Estevam, linux-remoteproc, imx,
linux-arm-kernel, linux-kernel, linux-imx, zhongqiu.han
On 12/9/2025 7:33 AM, Shenwei Wang wrote:
> 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".
>
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
> ---
> drivers/remoteproc/imx_rproc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index 3be8790c14a2..33f21ab24c92 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -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++;
> }
--
Thx and BRs,
Zhongqiu Han
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check
2025-12-08 23:33 [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check Shenwei Wang
` (2 preceding siblings ...)
2025-12-11 6:20 ` Zhongqiu Han
@ 2025-12-15 2:19 ` Mathieu Poirier
2025-12-15 11:11 ` Peng Fan
2025-12-15 10:15 ` Peng Fan
` (2 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: Mathieu Poirier @ 2025-12-15 2:19 UTC (permalink / raw)
To: Shenwei Wang
Cc: Bjorn Andersson, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel, linux-imx
On Mon, Dec 08, 2025 at 05:33:02PM -0600, Shenwei Wang wrote:
> 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".
>
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> ---
> drivers/remoteproc/imx_rproc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index 3be8790c14a2..33f21ab24c92 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -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?
> b++;
> }
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check
2025-12-08 23:33 [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check Shenwei Wang
` (3 preceding siblings ...)
2025-12-15 2:19 ` Mathieu Poirier
@ 2025-12-15 10:15 ` Peng Fan
2025-12-15 10:20 ` Peng Fan
2025-12-15 11:13 ` Peng Fan
2025-12-16 20:53 ` Mathieu Poirier
6 siblings, 1 reply; 10+ messages in thread
From: Peng Fan @ 2025-12-15 10:15 UTC (permalink / raw)
To: Shenwei Wang, Bjorn Andersson, Mathieu Poirier, Shawn Guo,
Sascha Hauer
Cc: Pengutronix Kernel Team, Fabio Estevam,
linux-remoteproc@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, dl-linux-imx
Hi Shenwei,
> 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.
>
> To handle such cases, use strstarts() instead of strcmp() when checking
> for "rsc-table".
>
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> ---
> drivers/remoteproc/imx_rproc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/imx_rproc.c
> b/drivers/remoteproc/imx_rproc.c index
> 3be8790c14a2..33f21ab24c92 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -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
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check
2025-12-15 10:15 ` Peng Fan
@ 2025-12-15 10:20 ` Peng Fan
0 siblings, 0 replies; 10+ messages in thread
From: Peng Fan @ 2025-12-15 10:20 UTC (permalink / raw)
To: Shenwei Wang, Bjorn Andersson, Mathieu Poirier, Shawn Guo,
Sascha Hauer
Cc: Pengutronix Kernel Team, Fabio Estevam,
linux-remoteproc@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, dl-linux-imx
> Subject: RE: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-
> table" check
>
> Hi Shenwei,
>
> > 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?
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.
>
> Regards
> Peng.
>
> >
> > To handle such cases, use strstarts() instead of strcmp() when
> > checking for "rsc-table".
> >
> > Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> > ---
> > drivers/remoteproc/imx_rproc.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/remoteproc/imx_rproc.c
> > b/drivers/remoteproc/imx_rproc.c index
> > 3be8790c14a2..33f21ab24c92 100644
> > --- a/drivers/remoteproc/imx_rproc.c
> > +++ b/drivers/remoteproc/imx_rproc.c
> > @@ -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
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check
2025-12-15 2:19 ` Mathieu Poirier
@ 2025-12-15 11:11 ` Peng Fan
0 siblings, 0 replies; 10+ messages in thread
From: Peng Fan @ 2025-12-15 11:11 UTC (permalink / raw)
To: Mathieu Poirier, Shenwei Wang
Cc: Bjorn Andersson, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, linux-remoteproc@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, dl-linux-imx
> Subject: Re: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-
> table" check
>
> On Mon, Dec 08, 2025 at 05:33:02PM -0600, Shenwei Wang wrote:
> > 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".
> >
> > Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> > ---
> > drivers/remoteproc/imx_rproc.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/remoteproc/imx_rproc.c
> > b/drivers/remoteproc/imx_rproc.c index
> 3be8790c14a2..33f21ab24c92
> > 100644
> > --- a/drivers/remoteproc/imx_rproc.c
> > +++ b/drivers/remoteproc/imx_rproc.c
> > @@ -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?
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/20250423-dt-memory-region-v2-v2-4-2fbd6ebd3c88@kernel.org/
Regards
Peng.
>
> > b++;
> > }
> > --
> > 2.43.0
> >
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check
2025-12-08 23:33 [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check Shenwei Wang
` (4 preceding siblings ...)
2025-12-15 10:15 ` Peng Fan
@ 2025-12-15 11:13 ` Peng Fan
2025-12-16 20:53 ` Mathieu Poirier
6 siblings, 0 replies; 10+ messages in thread
From: Peng Fan @ 2025-12-15 11:13 UTC (permalink / raw)
To: Shenwei Wang, Bjorn Andersson, Mathieu Poirier, Shawn Guo,
Sascha Hauer
Cc: Pengutronix Kernel Team, Fabio Estevam,
linux-remoteproc@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, dl-linux-imx
> Subject: [PATCH] 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".
>
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
With fixes tag added:
Reviewed-by: Peng Fan <peng.fan@nxp.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check
2025-12-08 23:33 [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check Shenwei Wang
` (5 preceding siblings ...)
2025-12-15 11:13 ` Peng Fan
@ 2025-12-16 20:53 ` Mathieu Poirier
6 siblings, 0 replies; 10+ messages in thread
From: Mathieu Poirier @ 2025-12-16 20:53 UTC (permalink / raw)
To: Shenwei Wang
Cc: Bjorn Andersson, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, linux-remoteproc, imx, linux-arm-kernel,
linux-kernel, linux-imx
On Mon, Dec 08, 2025 at 05:33:02PM -0600, Shenwei Wang wrote:
> 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".
>
> Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
> ---
> drivers/remoteproc/imx_rproc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied.
Thanks,
Mathieu
> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
> index 3be8790c14a2..33f21ab24c92 100644
> --- a/drivers/remoteproc/imx_rproc.c
> +++ b/drivers/remoteproc/imx_rproc.c
> @@ -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
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-12-16 20:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-08 23:33 [PATCH] remoteproc: imx_rproc: Use strstarts for "rsc-table" check Shenwei Wang
2025-12-09 12:36 ` Daniel Baluta
2025-12-09 16:05 ` Frank Li
2025-12-11 6:20 ` Zhongqiu Han
2025-12-15 2:19 ` Mathieu Poirier
2025-12-15 11:11 ` Peng Fan
2025-12-15 10:15 ` Peng Fan
2025-12-15 10:20 ` Peng Fan
2025-12-15 11:13 ` Peng Fan
2025-12-16 20:53 ` Mathieu Poirier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).