[PATCH] Fix sparse checks processing

Tom Rini trini at konsulko.com
Tue May 16 20:54:41 CEST 2023


On Tue, May 16, 2023 at 06:18:56AM +0000, Christophe Leroy wrote:
> 
> 
> 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 ?

In theory something like those could be adapted, and if you can either
test something for GitLab / Azure, or even something I can integrate in
to my release scripts like Coverity scan for after the fact new
introductions, I'd appreciate it.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230516/7dbb8bec/attachment.sig>


More information about the U-Boot mailing list