X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=Documentation%2Fsparse.txt;h=42f43fa59f24c75c1f553dc5078f88b949302fd9;hb=37897989232e6533772b0e24369b35ee9f56c8b6;hp=1829009db771042038f3e302a8c35dbcb07c1d14;hpb=c1d9728ecc5b560465df3c0c0d3b3825c2710b40;p=linux-2.6-omap-h63xx.git diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt index 1829009db77..42f43fa59f2 100644 --- a/Documentation/sparse.txt +++ b/Documentation/sparse.txt @@ -1,5 +1,6 @@ Copyright 2004 Linus Torvalds Copyright 2004 Pavel Machek +Copyright 2006 Bob Copeland Using sparse for typechecking ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -41,23 +42,20 @@ sure that bitwise types don't get mixed up (little-endian vs big-endian vs cpu-endian vs whatever), and there the constant "0" really _is_ special. -Modify top-level Makefile to say +Getting sparse +~~~~~~~~~~~~~~ -CHECK = sparse -Wbitwise +You can get latest released versions from the Sparse homepage at +http://www.kernel.org/pub/linux/kernel/people/josh/sparse/ -or you don't get any checking at all. +Alternatively, you can get snapshots of the latest development version +of sparse using git to clone.. + git://git.kernel.org/pub/scm/linux/kernel/git/josh/sparse.git -Where to get sparse -~~~~~~~~~~~~~~~~~~~ +DaveJ has hourly generated tarballs of the git tree available at.. -With git, you can just get it from - - rsync://rsync.kernel.org/pub/scm/devel/sparse/sparse.git - -and DaveJ has tar-balls at - - http://www.codemonkey.org.uk/projects/git-snapshots/sparse/ + http://www.codemonkey.org.uk/projects/git-snapshots/sparse/ Once you have it, just do @@ -65,8 +63,20 @@ Once you have it, just do make make install -as your regular user, and it will install sparse in your ~/bin directory. -After that, doing a kernel make with "make C=1" will run sparse on all the -C files that get recompiled, or with "make C=2" will run sparse on the -files whether they need to be recompiled or not (ie the latter is fast way -to check the whole tree if you have already built it). +as a regular user, and it will install sparse in your ~/bin directory. + +Using sparse +~~~~~~~~~~~~ + +Do a kernel make with "make C=1" to run sparse on all the C files that get +recompiled, or use "make C=2" to run sparse on the files whether they need to +be recompiled or not. The latter is a fast way to check the whole tree if you +have already built it. + +The optional make variable CF can be used to pass arguments to sparse. The +build system passes -Wbitwise to sparse automatically. To perform endianness +checks, you may define __CHECK_ENDIAN__: + + make C=2 CF="-D__CHECK_ENDIAN__" + +These checks are disabled by default as they generate a host of warnings.