]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
checkpatch: allow open braces on typedef lines
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 5 Oct 2015 12:45:55 +0000 (14:45 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 12 Oct 2015 16:29:26 +0000 (18:29 +0200)
The style here seems to be split according to the maintainer, but
traditionally open braces were placed on typedef lines.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/checkpatch.pl

index b6d71eae17cc2280b43b06f1ea9a1c400a34ad07..d51346a4f9fe1a179e98d40a6336427f4422cb61 100755 (executable)
@@ -1704,11 +1704,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);