From 934cae8781bf04f086f8302ef88542ee6604a576 Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Mon, 25 Jul 2016 09:05:20 -0400 Subject: infra: remove anti-typedef check Linus's dislike of typedefs is one of his most idiosyncratic positions, at odds with the mainstream of software engineering and practice. There's no reason that quirk should have been imposed on this project, which was done by fiat when we adopted a style checker written for a very different audience and environment. Change-Id: Ic08b0d14a0130ee88c3f60dcac07670d91004c2b Signed-off-by: Jeff Darcy Reviewed-on: http://review.gluster.org/15004 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Vijay Bellur --- extras/checkpatch.pl | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'extras') diff --git a/extras/checkpatch.pl b/extras/checkpatch.pl index dee070c8c7c..205567307b1 100755 --- a/extras/checkpatch.pl +++ b/extras/checkpatch.pl @@ -2634,17 +2634,6 @@ sub process { } } -# check for new typedefs, only function parameters and sparse annotations -# make sense. - if ($line =~ /\btypedef\s/ && - $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ && - $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ && - $line !~ /\b$typeTypedefs\b/ && - $line !~ /\b__bitwise(?:__|)\b/) { - WARN("NEW_TYPEDEFS", - "do not add new typedefs\n" . $herecurr); - } - # * goes on variable not on type # (char*[ const]) while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) { -- cgit