From: Paolo Bonzini Date: Mon, 5 Oct 2015 12:45:55 +0000 (+0200) Subject: checkpatch: allow open braces on typedef lines X-Git-Tag: v2.5.0-rc0~67^2~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b906129524d564d61760d04586d6c2301457ead;p=thirdparty%2Fqemu.git checkpatch: allow open braces on typedef lines The style here seems to be split according to the maintainer, but traditionally open braces were placed on typedef lines. Suggested-by: Peter Maydell Signed-off-by: Paolo Bonzini --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b6d71eae17c..d51346a4f9f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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);