diff options
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b6d71eae17..b0f6e113c5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1010,7 +1010,9 @@ sub possible { case| else| asm|__asm__| - do + do| + \#| + \#\# )(?:\s|$)| ^(?:typedef|struct|enum)\b )}x; @@ -1704,11 +1706,6 @@ sub process { ERROR("open brace '{' following $1 go on the same line\n" . $hereprev); } -# ... however, open braces on typedef lines should be avoided. - if ($line =~ /^.\s*typedef\s+(enum|union|struct)(?:\s+$Ident\b)?.*[^;]$/) { - ERROR("typedefs should be separate from struct declaration\n" . $herecurr); - } - # missing space after union, struct or enum definition if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident)?(?:\s+$Ident)?[=\{]/) { ERROR("missing space after $1 definition\n" . $herecurr); |