[PATCH v2 6/7] remoteproc: stm32: Avoid directly taking address of auto_boot

Peng Fan
2025-10-10T12:25:14Z

The rproc->auto_boot field is going to be defined as a bit-field, which
makes it illegal to take its address in C.

To avoid build issue, a temporary boolean variable is introduced in
stm32_rproc_probe() to hold the parsed value from the device tree.
The value is then assigned to rproc->auto_boot after parsing.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/remoteproc/stm32_rproc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c
index 431648607d53ae58a9a556d53f17b1bf924bcd80..b28907c240125cdcf73867e2704eaa974d5e1401 100644
--- a/drivers/remoteproc/stm32_rproc.c
+++ b/drivers/remoteproc/stm32_rproc.c
@@ -838,6 +838,7 @@ static int stm32_rproc_probe(struct platform_device *pdev)
const char *fw_name;
struct rproc *rproc;
unsigned int state;
+ bool auto_boot;
int ret;

ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
@@ -857,10 +858,12 @@ static int stm32_rproc_probe(struct platform_device *pdev)

rproc_coredump_set_elf_info(rproc, ELFCLASS32, EM_NONE);

- ret = stm32_rproc_parse_dt(pdev, ddata, &rproc->auto_boot);
+ ret = stm32_rproc_parse_dt(pdev, ddata, &auto_boot);
if (ret)
goto free_rproc;

+ rproc->auto_boot = auto_boot;
+
ret = stm32_rproc_of_memory_translations(pdev, ddata);
if (ret)
goto free_rproc;

--
2.37.1