Re: [PATCH] mtd: cfi: allow building spi-intel standalone

From: Mika Westerberg
Date: Fri Dec 16 2022 - 01:36:40 EST


On Thu, Dec 15, 2022 at 05:39:38PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> When MTD or MTD_CFI_GEOMETRY is disabled, the spi-intel driver
> fails to build, as it includes the shared CFI header:
>
> include/linux/mtd/cfi.h:62:2: error: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Werror=cpp]
> 62 | #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work.
>
> Use an #ifdef here to guard the settings so the header can be included
> in all configurations.
>
> Fixes: e23e5a05d1fd ("mtd: spi-nor: intel-spi: Convert to SPI MEM")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Reviewed-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>