From: sashiko-bot@kernel.org
To: "Laurentiu Mihalcea" <laurentiumihalcea111@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org,
imx@lists.linux.dev, Frank.Li@kernel.org
Subject: Re: [PATCH 2/5] remoteproc: imx_rpoc: fix carveout name parsing
Date: Fri, 22 May 2026 12:04:16 +0000 [thread overview]
Message-ID: <20260522120416.CC5B51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260522111849.783-3-laurentiumihalcea111@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Incomplete error handling of `of_property_read_string_index()` causes driver probe failure and silent truncation of memory regions if `memory-region-names` is malformed.
- [Low] The header `imx_rproc.h` is missing necessary `#include` directives for the APIs and types used in the newly added `imx_rproc_rmem_to_resource` inline function.
--
commit 892c9b40a1305beaf42a4c79b061576551f828eb
Author: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
remoteproc: imx_rpoc: fix carveout name parsing
This commit modifies carveout name parsing to use the names provided by the
"memory-region-names" device tree property if available. It introduces a
common helper function imx_rproc_rmem_to_resource() to fall back to the old
behavior if the property is not present.
> diff --git a/drivers/remoteproc/imx_rproc.h b/drivers/remoteproc/imx_rproc.h
> --- a/drivers/remoteproc/imx_rproc.h
> +++ b/drivers/remoteproc/imx_rproc.h
[ ... ]
> @@ -45,4 +45,23 @@ struct imx_rproc_dcfg {
> u32 reset_vector_mask;
> };
>
> +static inline int imx_rproc_rmem_to_resource(struct device_node *np,
> + int index,
> + struct resource *res)
> +{
[Severity: Low]
This isn't a bug, but this header file appears to be missing includes for
<linux/of.h>, <linux/of_reserved_mem.h>, and <linux/ioport.h> which define
the structures and APIs used in this new inline function.
Could this cause build failures in the future if another file includes this
header without first including the prerequisite headers?
> + int ret;
> +
> + ret = of_reserved_mem_region_to_resource(np, index, res);
> + if (ret)
> + return ret;
> +
> + /* "memory-region-names" is optional */
> + ret = of_property_read_string_index(np, "memory-region-names",
> + index, &res->name);
> + if (ret == -EINVAL)
> + return 0;
[Severity: High]
If the "memory-region-names" property exists but has fewer entries than the
"memory-region" array, of_property_read_string_index() can return -ENODATA.
Will returning -ENODATA here instead of 0 cause imx_rproc_prepare() to break
prematurely out of its while loop, silently ignoring the remaining valid
memory regions?
Also, could this cause imx_rproc_addr_init() to completely fail the driver
probe if it encounters an incomplete property? Should this treat any negative
return value from of_property_read_string_index() as non-fatal to properly
maintain the old fallback behavior?
> +
> + return ret;
> +}
> +
> #endif /* _IMX_RPROC_H */
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260522111849.783-1-laurentiumihalcea111@gmail.com?part=2
next prev parent reply other threads:[~2026-05-22 12:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 11:18 [PATCH 0/5] Add RPROC support for the MX95-15x15-FRDM board Laurentiu Mihalcea
2026-05-22 11:18 ` [PATCH 1/5] dt-bindings: remoteproc: imx_rproc: document optional "memory-region-names" Laurentiu Mihalcea
2026-05-22 11:41 ` sashiko-bot
2026-05-22 18:00 ` Frank Li
2026-05-22 11:18 ` [PATCH 2/5] remoteproc: imx_rpoc: fix carveout name parsing Laurentiu Mihalcea
2026-05-22 12:04 ` sashiko-bot [this message]
2026-05-22 11:18 ` [PATCH 3/5] arm64: dts: freescale: imx95-toradex-smarc: move CM7 node to SoC DTSI Laurentiu Mihalcea
2026-05-22 12:18 ` sashiko-bot
2026-05-22 14:02 ` Francesco Dolcini
2026-05-22 11:18 ` [PATCH 4/5] arm64: dts: freescale: imx95-15x15-frdm: remove common rmem regions Laurentiu Mihalcea
2026-05-22 12:32 ` sashiko-bot
2026-05-22 11:18 ` [PATCH 5/5] arm64: dts: freescale: add DT overlay for MX95-15x15-FRDM RPMSG usage Laurentiu Mihalcea
2026-05-22 12:11 ` Daniel Baluta
2026-05-22 12:48 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260522120416.CC5B51F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=laurentiumihalcea111@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox