Re: [PATCH] update checkpatch.pl to version 0.10

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andy Whitcroft <apw@...>
Cc: Andrew Morton <akpm@...>, Randy Dunlap <rdunlap@...>, Joel Schopp <jschopp@...>, <linux-kernel@...>
Date: Friday, September 28, 2007 - 4:40 am

* Andy Whitcroft <apw@shadowen.org> wrote:


your checkpatch patch itself produces 22 warnings ...

i ran it over kernel/sched.c and there are many bogus warnings that i 
reported to you earlier:

  WARNING: multiple assignments should be avoided
  #2319:
  +       max_load = this_load = total_load = total_pwr = 0;

and new bogus ones:

  ERROR: need consistent spacing around '*' (ctx:WxV)
  #5287:
  +               mode_t mode, proc_handler *proc_handler)

  ERROR: need consistent spacing around '*' (ctx:WxV)
  #5328:
  +static ctl_table *sd_alloc_ctl_cpu_table(int cpu)

  ERROR: need space before that '*' (ctx:VxV)
  #209:
  +# define INIT_TASK_GRP_LOAD    2*NICE_0_LOAD

why did you ignore my feedback? Ever since v8 the quality of 
checkpatch.pl has been getting worse and worse as there are way too many 
false positives. I'm still stuck on v8 for my own use, v9 and v10 is 
unusable.

	Ingo

--------------->
WARNING: line over 80 characters
#174: FILE: scripts/checkpatch.pl:572:
+		     $line =~ /^.\s*(?:$Storage\s+)?($Ident)\b\s*\**\s*$Ident\s*(?:;|=)/)) {

WARNING: line over 80 characters
#186: FILE: scripts/checkpatch.pl:584:
+						(?:\s*\*+\s*const|\s*\*+|(?:\s*\[\s*\])+)?

WARNING: line over 80 characters
#200: FILE: scripts/checkpatch.pl:612:
+				ERROR("switch and case should be at the same indent\n$hereline$err");

WARNING: line over 80 characters
#208: FILE: scripts/checkpatch.pl:619:
+			my ($level, @ctx) = ctx_statement_level($linenr, $realcnt, 0);

WARNING: line over 80 characters
#213: FILE: scripts/checkpatch.pl:624:
+			# Skip over any removed lines in the context following statement.

WARNING: line over 80 characters
#221: FILE: scripts/checkpatch.pl:635:
+			if ($level == 0 && $ctx =~ /\)\s*\;\s*$/ && defined $lines[$ctx_ln - 1]) {

WARNING: line over 80 characters
#222: FILE: scripts/checkpatch.pl:636:
+				my ($nlength, $nindent) = line_stats($lines[$ctx_ln - 1]);

WARNING: line over 80 characters
#224: FILE: scripts/checkpatch.pl:638:
+					WARN("Trailing semicolon indicates no statements, indent implies otherwise\n" .

WARNING: line over 80 characters
#225: FILE: scripts/checkpatch.pl:639:
+						"$here\n$ctx\n$lines[$ctx_ln - 1]");

WARNING: line over 80 characters
#245: FILE: scripts/checkpatch.pl:722:
+		} elsif ($line =~ m{$NonptrType(\*+)(?:\s+(?:$Attribute|$Sparse))?\s+[A-Za-z\d_]+}) {

WARNING: line over 80 characters
#250: FILE: scripts/checkpatch.pl:726:
+		} elsif ($line =~ m{$NonptrType\s+(\*+)(?!\s+(?:$Attribute|$Sparse))\s+[A-Za-z\d_]+}) {

WARNING: line over 80 characters
#288: FILE: scripts/checkpatch.pl:842:
+						^.\#\s*define\s+$Ident\s*(?:\([^\)]*\))?|

WARNING: line over 80 characters
#313: FILE: scripts/checkpatch.pl:867:
+						my $before = ctx_expr_before($unary_ctx);

WARNING: line over 80 characters
#314: FILE: scripts/checkpatch.pl:868:
+						if ($before =~ /(?:for|if|while)\s*$/) {

WARNING: line over 80 characters
#320: FILE: scripts/checkpatch.pl:874:
+					if ($op eq '*' && $unary_ctx =~ /$UnaryDefine$/) {

WARNING: line over 80 characters
#326: FILE: scripts/checkpatch.pl:880:
+				#	print "UNARY: <$is_unary $a:$op:$c> <$ca:$op:$cc> <$unary_ctx>\n";

WARNING: line over 80 characters
#338: FILE: scripts/checkpatch.pl:905:
+				# '*' as part of a type definition -- reported already.

WARNING: line over 80 characters
#346: FILE: scripts/checkpatch.pl:913:
+				         ($is_unary && ($op eq '*' || $op eq '-' || $op eq '&'))) {

WARNING: line over 80 characters
#347: FILE: scripts/checkpatch.pl:914:
+					if ($ctx !~ /[WEB]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {

WARNING: line over 80 characters
#387: FILE: scripts/checkpatch.pl:932:
+					 $op eq '&' or $op eq '^' or $op eq '|' or

WARNING: line over 80 characters
#432: FILE: scripts/checkpatch.pl:1160:
+			ERROR("Use of $1 is deprecated: see Documentation/spinlocks.txt\n" . $herecurr);

WARNING: line over 80 characters
#456: FILE: scripts/checkpatch.pl:1230:
+			WARN("unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr);

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Wed Sep 12, 11:00 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 4:40 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 5:52 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andrew Morton, (Fri Sep 28, 5:01 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 5:44 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 5:22 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 5:39 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 6:00 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Sam Ravnborg, (Fri Sep 28, 12:51 pm)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Sep 28, 6:49 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Ingo Molnar, (Fri Oct 5, 1:56 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 9:21 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andrew Morton, (Fri Sep 28, 1:46 pm)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Sat Sep 29, 5:22 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Randy Dunlap, (Fri Sep 28, 1:26 pm)
Re: [PATCH] update checkpatch.pl to version 0.10, Joel Schopp, (Fri Sep 28, 11:50 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Pekka Enberg, (Fri Sep 28, 9:37 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Andy Whitcroft, (Fri Sep 28, 10:02 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Christian Borntraeger, (Fri Sep 28, 6:46 am)
Re: [PATCH] update checkpatch.pl to version 0.10, WANG Cong, (Fri Sep 28, 7:03 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Jan Engelhardt, (Fri Sep 28, 10:19 am)
Re: [PATCH] update checkpatch.pl to version 0.10, Randy Dunlap, (Fri Sep 28, 12:57 pm)