mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: stm32: select GENERIC_ALLOCATOR
@ 2026-11-30 12:40 Pengpeng Hou
  0 siblings, 0 replies; only message in thread
From: Pengpeng Hou @ 2026-11-30 12:40 UTC (permalink / raw)
  To: broonie
  Cc: alain.volmat, mcoquelin.stm32, alexandre.torgue, linux-spi,
	linux-stm32, linux-arm-kernel, linux-kernel, hppiscas

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-30 12:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 12:40 [PATCH] spi: stm32: select GENERIC_ALLOCATOR Pengpeng Hou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®