Skip to contentSkip to conversation

checkpatch: allow open braces on typedef lines

PATCH In review Paolo Bonzini 2 participants 2 messages Oct 5, 2015 – Oct 6, 2015 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 scripts/checkpatch.pl | 5 -----
 1 file changed, 5 deletions(-)
scripts/checkpatch.pl +0 -5
index 3c19f9f..c814281 100755
@@ -1714,11 +1714,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);
Signature · 1 line
2.5.0