Skip to content
Commit 6ab7c3d6 authored by Christophe Leroy's avatar Christophe Leroy Committed by Tom Rini
Browse files

Fix sparse checks processing



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 aa9e891c ("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: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
parent a0f9a779
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment