kbuild: disable sparse warnings about unknown attributes
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Thu, 15 Feb 2018 21:07:50 +0000 (22:07 +0100)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 1 Mar 2018 15:26:46 +0000 (00:26 +0900)
Currently, sparse issues warnings on code using an attribute
it doesn't know about.

One of the problem with this is that these warnings have no
value for the developer, it's just noise for him. At best these
warnings tell something about some deficiencies of sparse itself
but not about a potential problem with code analyzed.

A second problem with this is that sparse release are, alas,
less frequent than new attributes are added to GCC.

So, avoid the noise by asking sparse to not warn about
attributes it doesn't know about.

Reference: https://marc.info/?l=linux-sparse&m=151871600016790
Reference: https://marc.info/?l=linux-sparse&m=151871725417322
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile

index ae07c704ba6f22723b099a1b478e980dca11ef9f..7b3080423b8a1c8a1821c8724776f5fa2df89fcf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -388,7 +388,7 @@ PYTHON              = python
 CHECK          = sparse
 
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-                 -Wbitwise -Wno-return-void $(CF)
+                 -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)
 NOSTDINC_FLAGS  =
 CFLAGS_MODULE   =
 AFLAGS_MODULE   =