Skip to content

Commit ac82dbc

Browse files
quic-bjorandemathieupoirier
authored andcommitted
remoteproc: st: Fix indexing of memory-regions
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: 67a7bc7 ("remoteproc: Use of_reserved_mem_region_* functions for "memory-region"") Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com> Link: https://lore.kernel.org/r/20251126-st-remoteproc-double-index-v1-1-3b0a8b21ac18@oss.qualcomm.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent 950c74f commit ac82dbc

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

drivers/remoteproc/st_remoteproc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ static int st_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw)
155155
return -ENOMEM;
156156

157157
rproc_add_carveout(rproc, mem);
158-
index++;
159158
}
160159

161160
return rproc_elf_load_rsc_table(rproc, fw);

0 commit comments

Comments
 (0)