X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Documentation%2Fsparse.txt;fp=Documentation%2Fsparse.txt;h=3f1c5464b1c9f1206dd497e891e1bd6e691d15fb;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=5a311c38dd1ad7384dbfdd6f777bedc665f8c356;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/Documentation/sparse.txt b/Documentation/sparse.txt index 5a311c38d..3f1c5464b 100644 --- a/Documentation/sparse.txt +++ b/Documentation/sparse.txt @@ -1,6 +1,5 @@ Copyright 2004 Linus Torvalds Copyright 2004 Pavel Machek -Copyright 2006 Bob Copeland Using sparse for typechecking ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -42,8 +41,15 @@ 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. -Getting sparse -~~~~~~~~~~~~~~ +Use + + make C=[12] CF=-Wbitwise + +or you don't get any checking at all. + + +Where to get sparse +~~~~~~~~~~~~~~~~~~~ With git, you can just get it from @@ -51,7 +57,7 @@ With git, you can just get it from 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 @@ -59,20 +65,8 @@ Once you have it, just do make make install -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. +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).