From 3c554b45bf0b5c1b1f0a4f9b059b958e511ad71c Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Tue, 26 Oct 2010 14:23:14 -0700 Subject: [PATCH] --- yaml --- r: 217587 b: refs/heads/master c: 8cf6de7145943caa38c56c61cd83b17687afd900 h: refs/heads/master i: 217585: 4d5864aa23052b7dad9f6826e6367f9939a466aa 217583: 19b898afda33bc8c3c165d7653061c9ad1a4f8e5 v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 24c6cf728266..cf1ff6ffb8be 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 53a3c4487a05b8f26ef72fe434a750a3402c998f +refs/heads/master: 8cf6de7145943caa38c56c61cd83b17687afd900 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index bcdb54bd61a0..983ac1816da0 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1905,6 +1905,16 @@ sub process { ERROR("open brace '{' following function declarations go on the next line\n" . $herecurr); } +# missing space after union or struct definition + if ($rawline =~ /^\+\s*(union|struct)\s+$Ident[=\{]/) { + WARN("Missing space after struct or union definition\n" . $herecurr); + } + +# missing space after enum definition + if ($rawline =~ /^\+\s*enum\{/) { + WARN("Missing space after enum definition\n" . $herecurr); + } + # open braces for enum, union and struct go on the same line. if ($line =~ /^.\s*{/ && $prevline =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident)?\s*$/) {