[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c12e9758-bf30-4380-9486-cdd8a5d578be@ti.com>
Date: Fri, 10 Oct 2025 19:37:06 -0500
From: Andrew Davis <afd@...com>
To: Peng Fan <peng.fan@....com>, Bjorn Andersson <andersson@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Arnaud Pouliquen
<arnaud.pouliquen@...s.st.com>,
Daniel Baluta <daniel.baluta@....com>,
Maxime
Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue
<alexandre.torgue@...s.st.com>
CC: <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 6/7] remoteproc: stm32: Avoid directly taking address
of auto_boot
On 10/10/25 7:24 AM, Peng Fan wrote:
> The rproc->auto_boot field is going to be defined as a bit-field, which
One of the pitfalls of bit-fields :)
I'm assuming if you drop the next patch you will drop this patch too.
Andrew
> 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@....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;
>
Powered by blists - more mailing lists