]> 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>
Tue, 13 Dec 2011 06:43:19 +0000 (17:43 +1100)
commit202c1e0fb68bf33443b38554e05b64fa60ad6038
tree1480ece5c3242c2f29328445d2783951c0c75971
parent0c3e50b66e8d7ffecca60ef08cb3811957701afd
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