Re: [PATCH] sparse: Add CLOG option for saving warning

From: Christopher Li
Date: Tue Jul 08 2014 - 01:49:40 EST

On Mon, Jul 7, 2014 at 4:22 AM, Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:

>> > Typical usage:
>> >
>> > make -j8 C=2 CLOG=<logname>
> We do not need this kind of special handling of outputs from gcc.
> For sparse you just do a run with C=2 then you have it.
> In other words - this looks like overkill for somethign thas is achievable
> with simpler means.

I am aware of the C=2 flag. However, it does not provide consistent result
with "make -jn" flag.

Please consider that the gcc case is different. The kernel source is usually
clean of gcc warnings. If there is an error with gcc, the build process
stops. It is different with sparse. The primary goal of running sparse in
kernel build is to see those warning. Also sparse is a lot noisier than gcc
in the kernel build, so there is a need with logging which is not present
with gcc.

With this patch, here is a normal test procedure for me to see the impact of a
sparse change on kernel build:

$ make -j8 C=2 CLOG=std

# apply sparse change and make sparse

$ make -j8 C=2 CLOG=std-exp

$ find -name ".*.std.sparse" | while read -r file; do diff -du $file
sparse} ; done > /tmp/sparse-diff

Without the CLOG= option, the only way to get similar diff
result is disable "-jn" option. Which make the test process painfully

I agree if I don't use "make -jn" flags, using C=2 is good enough.
However, what is your suggestion if I do want to use "make -jn" for
sparse checking in the previous mentioned usage case?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at