Skip to content
Commit 8c8c45cf authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: fix macro argument reuse test

Multiple line macro definitions where the arguments are separated by line
continuations can cause checkpatch to emit invalid syntax regex tests.

This can occur when a single argument is modified in a part of a patch.

For example: (to not add a diff in the commit message)

$ ./scripts/checkpatch.pl --git db023296
Unterminated \g... pattern in regex; <very long regex omitted>

And, the test does not work correctly when these arguments are all new as
the initial patch line addition "+" is used in the argument name.

Fix this by stripping the line continuations and any "+" from the list of
arguments.

Link: http://lkml.kernel.org/r/86cdb43a4db70670c102020093f7fb4eb3003e01.camel@perches.com


Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cd261496
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment