Re: [PATCH] checkpatch: remove false unbalanced braces warning

2017-02-20 Thread Joe Perches
On Mon, 2017-02-20 at 13:16 +0100, Sven Eckelmann wrote: > Lines containing "} else {" should not be detected as unbalanced braces. > But the second check can be reduced to ".+else\s*{" and it therefore > never checked if the beginning of a line contains any other character > (like the relevant "}"

[PATCH] checkpatch: remove false unbalanced braces warning

2017-02-20 Thread Sven Eckelmann
Lines containing "} else {" should not be detected as unbalanced braces. But the second check can be reduced to ".+else\s*{" and it therefore never checked if the beginning of a line contains any other character (like the relevant "}"). This check would also return true for "} else {" and create wa