Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29086
b: refs/heads/master
c: e833195
h: refs/heads/master
v: v3
  • Loading branch information
Bob Copeland authored and Linus Torvalds committed Jun 23, 2006
1 parent 18f84f9 commit 12c6d4e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eefe85ee350ece1bdf3e9a61e941d3394a528660
refs/heads/master: e83319510b04dd51a60da8a0b4ccf8b92b3ab1ad
36 changes: 21 additions & 15 deletions trunk/Documentation/sparse.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Copyright 2004 Linus Torvalds
Copyright 2004 Pavel Machek <pavel@suse.cz>
Copyright 2006 Bob Copeland <me@bobcopeland.com>

Using sparse for typechecking
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -41,32 +42,37 @@ 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.

Use

make C=[12] CF=-Wbitwise

or you don't get any checking at all.


Where to get sparse
~~~~~~~~~~~~~~~~~~~
Getting sparse
~~~~~~~~~~~~~~

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

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.

0 comments on commit 12c6d4e

Please sign in to comment.