From: Pengpeng Hou <hppiscas@163.com>
To: broonie@kernel.org
Cc: alain.volmat@foss.st.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@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, hppiscas@163.com
Subject: [PATCH] spi: stm32: select GENERIC_ALLOCATOR
Date: Mon, 30 Nov 2026 20:40:50 +0800 [thread overview]
Message-ID: <20261130124050.73934-1-hppiscas@163.com> (raw)
The STM32 SPI SRAM-buffer path calls of_gen_pool_get() and gen_pool
allocation helpers. SPI_STM32 does not select GENERIC_ALLOCATOR, so
a COMPILE_TEST configuration can build the SPI driver without the
genalloc implementation and fail to link.
Select GENERIC_ALLOCATOR from SPI_STM32 so the SRAM-buffer path also
links in supported compile-test configurations.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: d17dd2f1d8a1 ("spi: stm32: use STM32 DMA with STM32 MDMA to enhance DDR use")
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
AI assistance: gpt 5 (patch preparation and review).
drivers/spi/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 49088e5..b22eb37 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -1141,6 +1141,7 @@ config SPI_STM32
tristate "STMicroelectronics STM32 SPI controller"
depends on ARCH_STM32 || COMPILE_TEST
select SPI_SLAVE
+ select GENERIC_ALLOCATOR
help
SPI driver for STMicroelectronics STM32 SoCs.
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
reply other threads:[~2026-11-30 12:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261130124050.73934-1-hppiscas@163.com \
--to=hppiscas@163.com \
--cc=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=broonie@kernel.org \
--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