Received: from eggs.gnu.org ([2001:4830:134:3::10]:39249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj59i-00051r-3p for qemu-devel@nongnu.org; Mon, 05 Oct 2015 08:46:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj59e-0001oe-SY for qemu-devel@nongnu.org; Mon, 05 Oct 2015 08:46:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj59e-0001oP-NL for qemu-devel@nongnu.org; Mon, 05 Oct 2015 08:46:10 -0400 From: Paolo Bonzini Date: Mon, 5 Oct 2015 14:46:08 +0200 Message-Id: <1444049168-16554-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] checkpatch: allow open braces on typedef lines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org 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 --- scripts/checkpatch.pl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3c19f9f..c814281 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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); -- 2.5.0