From: Andrew Davis <afd@ti.com>
To: Peng Fan <peng.fan@nxp.com>,
Bjorn Andersson <andersson@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>,
Daniel Baluta <daniel.baluta@nxp.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: <linux-remoteproc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 6/7] remoteproc: stm32: Avoid directly taking address of auto_boot
Date: Fri, 10 Oct 2025 19:37:06 -0500 [thread overview]
Message-ID: <c12e9758-bf30-4380-9486-cdd8a5d578be@ti.com> (raw)
In-Reply-To: <20251010-remoteproc-cleanup-v2-6-7cecf1bfd81c@nxp.com>
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@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;
>
next prev parent reply other threads:[~2025-10-11 0:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 12:24 [PATCH v2 0/7] remoteproc: core: misc update Peng Fan
2025-10-10 12:24 ` [PATCH v2 1/7] remoteproc: core: Drop redundant initialization of 'ret' in rproc_shutdown() Peng Fan
2025-10-11 0:22 ` Andrew Davis
2025-10-10 12:24 ` [PATCH v2 2/7] remoteproc: core: Sort header includes Peng Fan
2025-10-11 0:23 ` Andrew Davis
2025-10-10 12:24 ` [PATCH v2 3/7] remoteproc: core: Removed unused headers Peng Fan
2025-10-11 0:26 ` Andrew Davis
2025-10-10 12:24 ` [PATCH v2 4/7] remoteproc: core: Use cleanup.h macros to simplify lock handling Peng Fan
2025-10-11 0:34 ` Andrew Davis
2025-10-14 10:55 ` Peng Fan
2025-10-14 8:39 ` Dan Carpenter
2025-10-14 10:45 ` Peng Fan
2025-10-14 11:31 ` Dan Carpenter
2025-10-10 12:24 ` [PATCH v2 5/7] remoteproc: core: Remove unused export of rproc_va_to_pa Peng Fan
2025-10-11 0:34 ` Andrew Davis
2025-10-10 12:24 ` [PATCH v2 6/7] remoteproc: stm32: Avoid directly taking address of auto_boot Peng Fan
2025-10-11 0:37 ` Andrew Davis [this message]
2025-10-10 12:24 ` [PATCH v2 7/7] remoteproc: core: Consolidate bool flags into 1-bit bitfields Peng Fan
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=c12e9758-bf30-4380-9486-cdd8a5d578be@ti.com \
--to=afd@ti.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andersson@kernel.org \
--cc=arnaud.pouliquen@foss.st.com \
--cc=daniel.baluta@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mathieu.poirier@linaro.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=peng.fan@nxp.com \
/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