The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@mandelbit.com>
To: Alain Volmat <alain.volmat@foss.st.com>
Cc: Mark Brown <broonie@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Clement LE GOFFIC <clement.legoffic@foss.st.com>,
	linux-spi@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: stm32: fix missing pointer assignment in case of dma chaining
Date: Fri, 27 Feb 2026 00:03:58 +0100	[thread overview]
Message-ID: <eb249987-55b6-45ff-9cca-3ed198ba84cd@mandelbit.com> (raw)
In-Reply-To: <aaB4z_A4aTqirDGb@gnbcxd0016.gnb.st.com>

On 26/02/2026 17:46, Alain Volmat wrote:
> Hi,
> 
> On Tue, Feb 24, 2026 at 04:25:14PM +0100, Antonio Quartulli wrote:
>> Hi,
>>
>> On 24/02/2026 16:09, Alain Volmat wrote:
>>> Commit c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
>>> introduced a regression since dma descriptors generated as part of the
>>> stm32_spi_prepare_rx_dma_mdma_chaining function are not well propagated
>>> to the caller function, leading to mdma-dma chaining being no more
>>> functional.
>>>
>>> Fixes: c4f2c05ab029 ("spi: stm32: fix pointer-to-pointer variables usage")
>>> Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
>>> ---
>>>    drivers/spi/spi-stm32.c | 3 +++
>>>    1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
>>> index b99de8c4cc99..33f211e159ef 100644
>>> --- a/drivers/spi/spi-stm32.c
>>> +++ b/drivers/spi/spi-stm32.c
>>> @@ -1625,6 +1625,9 @@ static int stm32_spi_prepare_rx_dma_mdma_chaining(struct stm32_spi *spi,
>>>    		return -EINVAL;
>>>    	}
>>> +	*rx_mdma_desc = _mdma_desc;
>>> +	*rx_dma_desc = _dma_desc;
>>> +
>>
>> Thanks for catching this!
>>
>> Indeed my fix lost the pointer-to-pointer logic, which was needed to pass
>> back the computed values.
>>
>> This patch looks good, but at this point I think you can also remove the
>> lines:
>>
>> 	_dma_desc = NULL;
>>
>> in the error paths above? Setting them to NULL makes no sense as they are
>> not going anywhere.
> 
> I agree that those lines can be removed. However my feeling is that this
> is not part of this fix since this is more about removing useless lines.
> If this is ok for you I will propose another patch on top of the current
> one for that purpose and without the Fixes on it.

I agree.

This fix gets my

Acked-by: Antonio Quartulli <antonio@mandelbit.com>

However, I'd let Mark (the maintainer) decide.

Regards,


-- 
Antonio Quartulli

CEO and Co-Founder
Mandelbit Srl
https://www.mandelbit.com


  reply	other threads:[~2026-02-26 23:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 15:09 [PATCH] spi: stm32: fix missing pointer assignment in case of dma chaining Alain Volmat
2026-02-24 15:25 ` Antonio Quartulli
2026-02-26 16:46   ` Alain Volmat
2026-02-26 23:03     ` Antonio Quartulli [this message]
2026-02-27  1:23 ` Mark Brown

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=eb249987-55b6-45ff-9cca-3ed198ba84cd@mandelbit.com \
    --to=antonio@mandelbit.com \
    --cc=alain.volmat@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=broonie@kernel.org \
    --cc=clement.legoffic@foss.st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.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