diff options
author | Sven Eckelmann <[email protected]> | 2017-02-24 15:01:43 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-02-24 17:46:57 -0800 |
commit | 95330473636e5e4546f94874c957c3be66bb2140 (patch) | |
tree | ac0a78ccfadfd0c840b1e63fa93c8ffa28c77ada /drivers/misc/cxl/api.c | |
parent | e4c5babd32f974cf3db4b5bdb02f23132cc81afb (diff) |
checkpatch: remove false unbalanced braces warning
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 warnings like
CHECK: Unbalanced braces around else statement
#391: FILE: ./net/batman-adv/tvlv.c:391:
+ } else {
The check can be changed to check the whole line for the missing "}" to
avoid this false positive.
Fixes: 0d1532456c26 ("checkpatch: notice unbalanced else braces in a patch")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Sven Eckelmann <[email protected]>
Acked-by: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/misc/cxl/api.c')
0 files changed, 0 insertions, 0 deletions