[PATCH] Fix sparse checks processing

Christophe Leroy christophe.leroy at csgroup.eu
Tue May 16 08:18:56 CEST 2023



Le 15/05/2023 à 23:12, Tom Rini a écrit :
> On Fri, May 05, 2023 at 10:39:39AM +0200, Christophe Leroy wrote:
> 
>> A lot of errors are encountered when building with sparse checking
>> activated (make C=1 or make C=2).
>>
>> Many of them are fixed in Linux.
>>
>> Resynchronise Makefile and include/linux/build_bug.h with Linux
>> kernel sources by porting the following Linux commits into u-boot:
>> - 6c49f359ca14 ("kbuild: disable sparse warnings about unknown attributes")
>> - 80591e61a0f7 ("kbuild: tell sparse about the $ARCH")
>> - 8788994376d8 ("linux/build_bug.h: change type to int")
>> - 527edbc18a70 ("build_bug.h: remove most of dummy BUILD_BUG_ON stubs for Sparse")
>> - c60d3b79423a ("build_bug.h: remove negative-array fallback for BUILD_BUG_ON()")
>> - 14e83077d55f ("include: drop pointless __compiler_offsetof indirection")
>>
>> Also revert commit aa9e891c63 ("include/linux/stddef.h: avoid
>> 'warning: preprocessor token offsetof redefined'") because the
>> error it creates is worse than the warning it is trying to fix.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu>
> 
> First, I've applied to u-boot/next now.  But second, I had mentioned CI
> testing too, but seeing the level of checker-error output on qemu-arm I
> am reluctant to add a test that should build-to-completion but error so
> much as I worry about it being seen as a low quality test.
> 

Well, at least we can now start detecting and fixing them.

Also, I don't know how feasible it is, but in Linux kernel the robots 
report new warnings/error only so that you know you are not adding new 
ones with new commits. Could CI do that too ?

Christophe


More information about the U-Boot mailing list