Subject: Re: Increasing build coverage for drivers/spi/spi-ppc4xx.c

From: Michael Ellerman <[email-masked]>
Date: Wed, 28 Feb 2024 16:37:22 +1100

Christophe Leroy <[email-masked]> writes:
> Le 27/02/2024 à 15:00, Uwe Kleine-König a écrit :
>> On Tue, Feb 27, 2024 at 01:52:07PM +0000, Christophe Leroy wrote:
>>> Le 27/02/2024 à 11:58, Uwe Kleine-König a écrit :
>>>> On Tue, Feb 27, 2024 at 10:25:15AM +0000, Christophe Leroy wrote:
>>>>> Le 27/02/2024 à 09:46, Uwe Kleine-König a écrit :
>>>>>> recently the spi-ppc4xx.c driver suffered from build errors and warnings
>>>>>> that were undetected for longer than I expected. I think it would be
>>>>>> very beneficial if this driver was enabled in (at least) a powerpc
>>>>>> allmodconfig build.
>>>>>>
>>>>>> The challenge to do so is that spi-ppc4xx.c uses dcri_clrset() which is
>>>>>> only defined for 4xx (as these select PPC_DCR_NATIVE).
...
>> 
>> The reason I'd like to see it in allmodconfig is that testing
>> allmodconfig on several archs is the check I do for my patch series.
>
> I think for powerpc you should really check ppc32_allmodconfig in 
> addition to allmodconfig

Yeah.

arch/powerpc is really ~7 separate sub architectures.

Building allmodconfig and ppc32_allmodconfig at least covers the bulk of
the code. But it doesn't include 4xx, or several other platforms.

I think the best/easiest option is just to enable this driver in the 44x
defconfig. At least that way the auto builders should catch any problems.

eg.

diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig
index 8b595f67068c..95a1e7efb79f 100644
--- a/arch/powerpc/configs/ppc44x_defconfig
+++ b/arch/powerpc/configs/ppc44x_defconfig
@@ -67,6 +67,8 @@ CONFIG_I2C=m
 CONFIG_I2C_CHARDEV=m
 CONFIG_I2C_GPIO=m
 CONFIG_I2C_IBM_IIC=m
+CONFIG_SPI=y
+CONFIG_SPI_PPC4xx=y
 # CONFIG_HWMON is not set
 CONFIG_FB=m
 CONFIG_USB=m

cheers