Re: The sheer number of sparse warnings in the kernel

Guenter Roeck
2014-02-27T10:12:04Z

>> So getting this to the point where it is genuinely useful and can be
>> made a ubiquitous part of the Linux development process is going to take
>> more work and probably involve improvements to sparse so we can indicate
>> in the kernel sources when something is okay or removing completely
>> bogus warnings, and so on.
>
> Yes, for some areas of the kernel it will take some work, but for
> others, sparse works really well. As an example, building all of

Works quite nicely for me. I run both spatch and smatch on drivers/hwmon
and (partially) on drivers/watchdog. There is only one (false) warning
in hwmon from spatch, plus about a dozen smatch warnings. I find it very
valuable; even if warnings are false positives they often point to
less than perfect code.

I filter out some noise from smatch, but at least so far I did not have
to do any filtering for spatch.

Guenter