]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: Add --strict test for function pointer calling style
authorJoe Perches <joe@perches.com>
Wed, 10 Dec 2014 23:51:51 +0000 (15:51 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:12 +0000 (17:41 -0800)
commit4410dce80028fd56025609f586294447a0bc936d
tree8faec310c2965f428c2c1e2c7a97852108204b15
parenta25c0344415882d35752b02f25d5b245697291a5
checkpatch: Add --strict test for function pointer calling style

Peter Hurley wrote:

The use of older function ptr calling style, (*fn)(), makes static
analysis more error-prone; replace with modern fn() style.

So make checkpatch emit a --strict test for that condition.

Update the unnecessary parentheses test for dereferencing
objects at the same time and create a $fix mechanism too.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl