]> git.karo-electronics.de Git - karo-tx-linux.git/commit
checkpatch: improve memset and min/max with cast checking
authorJoe Perches <joe@perches.com>
Thu, 8 Dec 2011 04:42:22 +0000 (15:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 Dec 2011 05:51:57 +0000 (16:51 +1100)
commitcdc45fdd963f22c7788d8995215f46198680bebd
tree593024386ac9796f2dea10cfe01deb36096929ae
parentc65dabeea359372c8ec94239ccc069e314174ada
checkpatch: improve memset and min/max with cast checking

Improve the checking of arguments to memset and min/max tests.

Move the checking of min/max to statement blocks instead of single line.
Change $Constant to allow any case type 0x initiator and trailing ul
specifier.  Add $FuncArg type as any function argument with or without a
cast.  Print the whole statement when showing memset or min/max messages.
Improve the memset with 0 as 3rd argument error message.

There are still weaknesses in the $FuncArg and $Constant code as arbitrary
parentheses and negative signs are not generically supported.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/checkpatch.pl