From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>,
Bjorn Andersson <andersson@kernel.org>,
"Rob Herring (Arm)" <robh@kernel.org>,
Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remoteproc: st: Fix indexing of memory-regions
Date: Thu, 27 Nov 2025 08:36:17 -0700 [thread overview]
Message-ID: <aShv8UtdOKcN0Pof@p14s> (raw)
In-Reply-To: <20251126-st-remoteproc-double-index-v1-1-3b0a8b21ac18@oss.qualcomm.com>
On Wed, Nov 26, 2025 at 12:17:59PM -0600, Bjorn Andersson wrote:
> The recent transition to use of_reserved_mem_region_to_resource()
> changes the while loop to a for loop, but the increment of the "index"
> variable was left behind at the end of the loop, as highlighted by the
> following error/warning:
>
> error: variable 'index' is incremented both in the loop header and in the loop body [-Werror,-Wfor-loop-analysis]
>
> Drop the extra increment to avoid skipping over every other
> memory-region in the loop.
>
> Fixes: 67a7bc7f0358 ("remoteproc: Use of_reserved_mem_region_* functions for "memory-region"")
> Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
> ---
> drivers/remoteproc/st_remoteproc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c
> index 747bbe7f6f7c6be160f4f6a0202eb8df20dc5bc9..a07edf7217d21a3f08d26592e8a14814608507f8 100644
> --- a/drivers/remoteproc/st_remoteproc.c
> +++ b/drivers/remoteproc/st_remoteproc.c
> @@ -155,7 +155,6 @@ static int st_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw)
> return -ENOMEM;
>
> rproc_add_carveout(rproc, mem);
> - index++;
Really good - applied.
Thanks,
Mathieu
> }
>
> return rproc_elf_load_rsc_table(rproc, fw);
>
> ---
> base-commit: 663d0d1af3faefe673cabf4b6b077149a87ad71f
> change-id: 20251126-st-remoteproc-double-index-29a2e40e74bb
>
> Best regards,
> --
> Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
>
prev parent reply other threads:[~2025-11-27 15:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-26 18:17 [PATCH] remoteproc: st: Fix indexing of memory-regions Bjorn Andersson
2025-11-27 15:36 ` Mathieu Poirier [this message]
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=aShv8UtdOKcN0Pof@p14s \
--to=mathieu.poirier@linaro.org \
--cc=andersson@kernel.org \
--cc=arnaud.pouliquen@foss.st.com \
--cc=bjorn.andersson@oss.qualcomm.com \
--cc=geert+renesas@glider.be \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=patrice.chotard@foss.st.com \
--cc=robh@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.