smatch: add --pedantic option
The --pedantic option is to help me review new drivers. It means complain
about every possible thing.
Generally, with Smatch I avoid adding code to find style issues. I want
to focus on bugs and that keeps me busy enough. Plus style issues are
controversial so they require more energy than bug fixes.
So an example of a pedantic warning would be extra NULL checks when we know
that the pointer isn't NULL. I might not email to the author about
that, but I might. Another example would be using commas instead of
semi-colons.
In pedantic mode a high false positive rate is acceptable. So maybe every
array index has to be something that Smatch knows is correct otherwise it
generates a warning.
Basically I'm going to be going through the driver with a fine tooth comb
looking for any issues and style questions. You can't go through the whole
kernel line by line, but for new drivers then we can do it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>