aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sparse.txt8
-rw-r--r--Makefile12
2 files changed, 13 insertions, 7 deletions
diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt
index 5a311c38dd1a..f9c99c9a54f9 100644
--- a/Documentation/sparse.txt
+++ b/Documentation/sparse.txt
@@ -69,10 +69,10 @@ recompiled, or use "make C=2" to run sparse on the files whether they need to
69be recompiled or not. The latter is a fast way to check the whole tree if you 69be recompiled or not. The latter is a fast way to check the whole tree if you
70have already built it. 70have already built it.
71 71
72The optional make variable CF can be used to pass arguments to sparse. The 72The optional make variable CHECKFLAGS can be used to pass arguments to sparse.
73build system passes -Wbitwise to sparse automatically. To perform endianness 73The build system passes -Wbitwise to sparse automatically. To perform
74checks, you may define __CHECK_ENDIAN__: 74endianness checks, you may define __CHECK_ENDIAN__:
75 75
76 make C=2 CF="-D__CHECK_ENDIAN__" 76 make C=2 CHECKFLAGS="-D__CHECK_ENDIAN__"
77 77
78These checks are disabled by default as they generate a host of warnings. 78These checks are disabled by default as they generate a host of warnings.
diff --git a/Makefile b/Makefile
index 0d4a4dc7222d..cd50298fbda7 100644
--- a/Makefile
+++ b/Makefile
@@ -41,9 +41,15 @@ ifndef KBUILD_VERBOSE
41 KBUILD_VERBOSE = 0 41 KBUILD_VERBOSE = 0
42endif 42endif
43 43
44# Call checker as part of compilation of C files 44# Call a source code checker (by default, "sparse") as part of the
45# Use 'make C=1' to enable checking (sparse, by default) 45# C compilation.
46# Override with 'make C=1 CHECK=checker_executable CHECKFLAGS=....' 46#
47# Use 'make C=1' to enable checking of only re-compiled files.
48# Use 'make C=2' to enable checking of *all* source files, regardless
49# of whether they are re-compiled or not.
50#
51# See the file "Documentation/sparse.txt" for more details, including
52# where to get the "sparse" utility.
47 53
48ifdef C 54ifdef C
49 ifeq ("$(origin C)", "command line") 55 ifeq ("$(origin C)", "command line")