Re: [PATCH] spi: stm32: select GENERIC_ALLOCATOR
From: Alain Volmat
Date: Mon Nov 30 2026 - 09:00:05 EST
Hi,
thanks for your patch.
On Mon, Nov 30, 2026 at 08:40:50PM +0800, Pengpeng Hou wrote:
> 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@xxxxxxx>
> ---
> 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
>
Reviewed-by: Alain Volmat <alain.volmat@xxxxxxxxxxx>
Regards,
Alain