]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
checkpatch: improve tests for multiple line function definitions
authorJoe Perches <joe@perches.com>
Mon, 10 Jul 2017 22:52:19 +0000 (15:52 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Jul 2017 23:32:35 +0000 (16:32 -0700)
commita0ad75964e58cd7d9b6910e2bbb8a7e8656c0f51
treed8fa1c454226dfb8dc05502e8706912369611ed1
parent948b133a1b62441bd2ae98b866f409017191fdd3
checkpatch: improve tests for multiple line function definitions

Add a block that identifies multiple line function definitions.

Save the function name into $context_function to improve the embedded
function name test.

Look for misplaced open brace on the function definition.
Emit an OPEN_BRACE error when the function definition is similar to

     void foo(int arg1,
              int arg2) {

Miscellanea:

o Remove the $realfile test in function declaration w/o named arguments test
o Comment the function declaration w/o named arguments test

Link: http://lkml.kernel.org/r/de620ed6ebab75fdfa323741ada2134a0f545892.1496835238.git.joe@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl