checkpatch: remove false positive for space before )
PATCH 1/1 checkpatch: remove false positive for space before )
checkpatch reports the following error when a macro ends with a comma and a space:
ERROR: space prohibited before that close parenthesis ')'
This patch adds the condition "$line !~ /,\s+\)/" to avoid such cases, following the similar rule above "$line !~ /:\s+\)/".
Suggested-by Andy Shevchenko <[email protected]>
Signed-off-by Artur Stupa <[email protected]>
--- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/checkpatch.pl +2 -1
@@ -5494,7 +5494,8 @@ sub process { } if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ && $line !~ /for\s*\(.*;\s+\)/ && - $line !~ /:\s+\)/) { + $line !~ /:\s+\)/ && + $line !~ /,\s+\)/) { if (ERROR("SPACING", "space prohibited before that close parenthesis ')'\n" . $herecurr) && $fix) {
Signature · 1 line
2.43.0