]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: improve EMBEDDED_FUNCTION_NAME test
authorJoe Perches <joe@perches.com>
Mon, 8 May 2017 22:55:39 +0000 (15:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 May 2017 00:15:11 +0000 (17:15 -0700)
commitf659d51b3bc13f47200c983a6d5d524afd9034e3
treea0abeaa3adc83ad547c06d7d12df12bbc7b3b329
parent7f71623e0478489f5bf8763b3a04d528aed451d9
checkpatch: improve EMBEDDED_FUNCTION_NAME test

The existing behavior relies on patch context to identify function
declarations.  Add the ability to find function declarations when there
is an open brace in column 1.

This finds function declarations only in specific single line forms
where the function name is on a single line like:

  int foo(args...)
  {

and

  int
  foo(args...)
  {

It does not recognize function declarations like:

  int foo(int bar,
          int baz)
  {

Link: http://lkml.kernel.org/r/738d74bbbe1a06b80f11ed504818107c68903095.1488155636.git.joe@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl