login
Header Space

 
 

Improving checkpatch

September 30, 2007 - 6:27am
Submitted by Jeremy on September 30, 2007 - 6:27am.
Linux news

"This version brings a number of new checks, and a number of bug fixes," Andy Whitcroft noted in his announcement for version 0.10 of checkpatch.pl, used by Linux kernel developers to scan their code for common mistakes. Ingo Molnar expressed concern, "your checkpatch patch itself produces 22 warnings." He pointed out that there were numerous bogus warnings generated by the script, "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 continued, "what matters is that only items should be displayed that i _can_ fix. With v8 i was able to make kernel/sched*.c almost noise-free, but with v9 and v10 that's not possible anymore." He noted that he was fine with there being a flag that would cause the script to generate additional questionable warnings, "but these default false positives are _lethal_ for a tool like this. (and i made this point before.) This is a _fundamental_ thing".

Andy added a new option to make it possible to disable some of the more subjective tests, noting that he preferred the tests to be enabled by default, "fundamentally I am not trying to help the people who are careful but those who do not know better. As for the false positives, those I am always interested in and always striving to remove, as they annoy me as much as the next man." Andrew Morton disagreed with the option being enabled by default, suggesting, "off, I'd say. That way people are more likely to use it. Or, more accurately, will have less excuses to not use it." Andy acquiesced, "off it is." He added, "I will also review the tests which are warnings and checks (subjective) and see if any are now miss-categorised." He pointed out that as the script is not a C language parser, instead detecting C language style validations using regular expressions, it won't ever be 100% accurate and is instead only intended as a useful guide.


From: Ingo Molnar <mingo@...>
Subject: Re: [PATCH] update checkpatch.pl to version 0.10
Date: Sep 28, 4:40 am 2007

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

> This version brings a number of new checks, and a number of bug fixes.  

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  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.
-

From: Andy Whitcroft <apw@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 28, 5:52 am 2007 On Fri, Sep 28, 2007 at 10:40:03AM +0200, Ingo Molnar wrote: > > * Andy Whitcroft <apw@shadowen.org> wrote: > > > This version brings a number of new checks, and a number of bug fixes. > > 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. I think if you read your incoming email you will see nothing of the sort. I have discussed this with you and in public. The multiple assignment check you dissagree with and we have softened it in direct response to that dislike. However, the main proponent of this existing wanted that check. Therefore it has stayed. The other false positives you report are real. Some are fixed in my development version, others are not. They come from the fact that I was asked for better checks on '*' and the like in its binary mode. To get that I had to actually start telling unary and binary uses of the same operator appart. That is hard in the face of typedef'd types. I am working to make it better. However, the key here is that it will never be 100%, not without becoming a try C parser. The output is a _guide_ if you don't like its output ignore the reports you dislike. I for one send out patches with style violations where I deem that the code is better that way. -apw -
From: Andrew Morton <akpm@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 28, 5:01 am 2007 On Fri, 28 Sep 2007 10:40:03 +0200 Ingo Molnar <mingo@elte.hu> wrote: > 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; That warning is non-bogus, although this is one of the bogosities which I personally don't bother fixing or making a fuss about. But I do think it detracts from the readability of the code, and from patches which later alter that code. A bit. -
From: Ingo Molnar <mingo@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 28, 5:44 am 2007 * Andrew Morton <akpm@linux-foundation.org> wrote: > On Fri, 28 Sep 2007 10:40:03 +0200 Ingo Molnar <mingo@elte.hu> wrote: > > > 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; > > That warning is non-bogus, although this is one of the bogosities > which I personally don't bother fixing or making a fuss about. > > But I do think it detracts from the readability of the code, and from > patches which later alter that code. A bit. well, the two variants is: max_load = this_load = total_load = total_pwr = 0; max_load = 0; this_load = 0; total_load = 0; total_pwr = 0; and the first one is more readable and more compact. (as long as the conceptual 'type' of the variables is the same - which it is in this case.) anyway, this is something where reasonable people might disagree, and a tool should not force it one way or another. And this is the second time i raised this very example and Andy ignored my feedback and failed to notice the structural problem behind it (that a tool should only warn by default if it is _sure_ that there is a problem - otherwise the tool cannot be used for effective [i.e. automated] quality control), so i'm raising this point again, in a slightly more irritated tone ;-) Ingo -
From: Andy Whitcroft <apw@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 28, 5:22 am 2007 On Fri, Sep 28, 2007 at 02:01:32AM -0700, Andrew Morton wrote: > On Fri, 28 Sep 2007 10:40:03 +0200 Ingo Molnar <mingo@elte.hu> wrote: > > > 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; > > That warning is non-bogus, although this is one of the bogosities which > I personally don't bother fixing or making a fuss about. > > But I do think it detracts from the readability of the code, and from > patches which later alter that code. A bit. I tend to agree, watching the automatic replies from checkpatch, the majority of these are "justifiable" in their context. I think I'll lower this one to a CHECK in the next release. -apw -
From: Ingo Molnar <mingo@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 28, 5:39 am 2007 * Andy Whitcroft <apw@shadowen.org> wrote: > > > WARNING: multiple assignments should be avoided > > > #2319: > > > + max_load = this_load = total_load = total_pwr = 0; > > > > That warning is non-bogus, although this is one of the bogosities > > which I personally don't bother fixing or making a fuss about. > > > > But I do think it detracts from the readability of the code, and > > from patches which later alter that code. A bit. > > I tend to agree, watching the automatic replies from checkpatch, the > majority of these are "justifiable" in their context. I think I'll > lower this one to a CHECK in the next release. what matters is that only items should be displayed that i _can_ fix. With v8 i was able to make kernel/sched*.c almost noise-free, but with v9 and v10 that's not possible anymore. And the moment the default output of the tool cannot be made 'empty', we've lost the biggest battle. Seeing the same bogus (or borderline) warnings again and again destroys the biggest dynamic that could get people to use this tool more often: the gratification of having a 'perfectly clean' file/patch. And this is not about any particular false positive. I dont mind an "advanced mode" non-default opt-in option for the script, if someone is interested in borderline or hard to judge warnings too, but these default false positives are _lethal_ for a tool like this. (and i made this point before.) This is a _fundamental_ thing, and i'm still not sure whether you accept and understand that point. This is very basic and very important, and this isnt the first (or second) time i raised this. Ingo -
From: Andy Whitcroft <apw@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 28, 6:00 am 2007 On Fri, Sep 28, 2007 at 11:39:02AM +0200, Ingo Molnar wrote: > > * Andy Whitcroft <apw@shadowen.org> wrote: > > > > > WARNING: multiple assignments should be avoided > > > > #2319: > > > > + max_load = this_load = total_load = total_pwr = 0; > > > > > > That warning is non-bogus, although this is one of the bogosities > > > which I personally don't bother fixing or making a fuss about. > > > > > > But I do think it detracts from the readability of the code, and > > > from patches which later alter that code. A bit. > > > > I tend to agree, watching the automatic replies from checkpatch, the > > majority of these are "justifiable" in their context. I think I'll > > lower this one to a CHECK in the next release. > > what matters is that only items should be displayed that i _can_ fix. > With v8 i was able to make kernel/sched*.c almost noise-free, but with > v9 and v10 that's not possible anymore. And the moment the default > output of the tool cannot be made 'empty', we've lost the biggest > battle. Seeing the same bogus (or borderline) warnings again and again > destroys the biggest dynamic that could get people to use this tool more > often: the gratification of having a 'perfectly clean' file/patch. > > And this is not about any particular false positive. I dont mind an > "advanced mode" non-default opt-in option for the script, if someone is > interested in borderline or hard to judge warnings too, but these > default false positives are _lethal_ for a tool like this. (and i made > this point before.) This is a _fundamental_ thing, and i'm still not > sure whether you accept and understand that point. This is very basic > and very important, and this isnt the first (or second) time i raised > this. You are striving for a level of perfection that is simply not achieveable. v8 is silent about sched.c because it is not checking very much of it, the logical extension of your position is to run 0.1 as that didn't check anything. v9 and 10 carry checks for most of the binary operators which were not there before. Due as I have mentioned before to the complexity of handling the unary/binary scism that C has for those operators and our different spacing requirement for each mode. Whilst I can see that it is gratifying that a patch or file is violations free where there are stylistic aberations in it they should be reported. Where those are questionble showing those as "CHECK" is not unreasonable. I will add a "--no-check" for you so that those are suppressed based on the assumption you know what you are doing. I think it is clear that we differ on what should and should not be output by default. Clever people are able to opt out of the warnings, of things they think they dissagree with. It is the people with little experience who need the most guidance and those people who the tool should target by default. You cannot expect someone with no experience to know they need to add '--i-need-more-help' whereas _you_ I can expect to say '--leave-me-alone' or indeed to make the call that the output is plain wrong and _you_ know you should ignore it. Fundamentally I am not trying to help the people who are careful but those who do not know better. As for the false positives, those I am always interested in and always striving to remove, as they annoy me as much as the next man. -apw -
From: Sam Ravnborg <sam@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 28, 12:51 pm 2007 Hi Andy. > I think it is clear that we differ on what should and should not be > output by default. Clever people are able to opt out of the warnings, > of things they think they dissagree with. It is the people with little > experience who need the most guidance and those people who the tool > should target by default. You cannot expect someone with no experience > to know they need to add '--i-need-more-help' whereas _you_ I can expect > to say '--leave-me-alone' or indeed to make the call that the output is > plain wrong and _you_ know you should ignore it. The original purpose was to catch the most tivial coding style errors. But then people started to be far too innovative and we now ended up with a checkpatch that try to check for every lillte glory detail. It would be much preferable to have a checkpatch - and that may be an incarnation of the current one or a new one. What it should do would be to catch the trivialities that we see happens in many patch submissions like: a) wrong patch format (-p1, unified diff) b) Whitespace versus tabs c) PascalCasing in new functions d) excessive line length e) C99 comments '//' (not that I see why they are banned) and maybe a few more trivial chacks. This would benefit from a very low false-positive rate and it could then be used as a patch-bot. As it is now where it tries to check for everything and a bit more it generates too much noise so a patch-bot usage is not possible. And users get annoyed by the excessive output. If we then have the same script that in a -pedantic mode generate more noise - fine. But leave the default simple. Sam -
From: Ingo Molnar <mingo@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 28, 6:49 am 2007 * Andy Whitcroft <apw@shadowen.org> wrote: > On Fri, Sep 28, 2007 at 11:39:02AM +0200, Ingo Molnar wrote: > > > And this is not about any particular false positive. I dont mind an > > "advanced mode" non-default opt-in option for the script, if someone > > is interested in borderline or hard to judge warnings too, but these > > default false positives are _lethal_ for a tool like this. (and i > > made this point before.) This is a _fundamental_ thing, and i'm > > still not sure whether you accept and understand that point. This is > > very basic and very important, and this isnt the first (or second) > > time i raised this. > > You are striving for a level of perfection that is simply not > achieveable. you _still_ fail to understand (let alone address), the fundamental issues i raised many times. (see below for details) > v8 is silent about sched.c because it is not checking very much of it, the most usable checkpatch.pl version was v6/v7. It went downhill after that. Look at the script size versus the number of complaints about kernel/sched.c: size # warnings ---------------------------------------- 25383 checkpatch.pl.v6 5 26038 checkpatch.pl.v7 6 29603 checkpatch.pl.v8 65 31160 checkpatch.pl.v9 24 34950 checkpatch.pl.v10 28 i.e. size did not increase all that significantly, still the number of warnings has increased significantly - with little benefit. and here's the breakdown for v10: out of 28 warnings, only 6 are legitimate! So the signal to noise ratio has worsened significantly since v6. One warning per 300 lines of sched.c is _not manageable_. It translates to _over 25 thousand false positives_ for the whole kernel. every false warning has additive costs: i will have to ignore it from that point on, forever - and i frequently have to re-check the same thing again, and again - just to discover that the warning is still bogus. the mails from me in your mbox during the past few months should be proof that i'm fully constructive regarding this matter and that i'm not striving for 100% level of perfection. I'm simply stating the obvious: your tool is less and less useful with every new version and more troubling than that is your apparent inability to realize what this whole issue is about. (see below for details) > I think it is clear that we differ on what should and should not be > output by default. Clever people are able to opt out of the warnings, > of things they think they dissagree with. It is the people with > little experience who need the most guidance and those people who the > tool should target by default. You cannot expect someone with no > experience to know they need to add '--i-need-more-help' whereas _you_ > I can expect to say '--leave-me-alone' or indeed to make the call that > the output is plain wrong and _you_ know you should ignore it. you still dont get the point of this. This isnt about writing a tool that 'can' find something to complain about. This whole kernel source code quality task is about: _making kernel source code quality better_ not more, not less. If your tool outputs way too many false positives and way too many unimportant borderline cases, people will ignore the tool, and consequently YOU MAKE THE KERNEL'S SOURCE CODE WORSE than it could be. How hard is that to understand?? Having zero (or near zero) output from a checker mechanism is FUNDAMENTAL. ( and note that i was a goddamn early adopter of your tool, i'm a tester and i gave you feedback, and i'm one of the few kernel hackers who actually use your script as a mandatory component of their patch-toolchain here and today. But your unchanged fundamentalistic attitude has turned me from a happy supporter of checkpatch.pl into an almost-opponent. If anything, that should be a warning shot for you. ) > Fundamentally I am not trying to help the people who are careful but > those who do not know better. As for the false positives, those I am > always interested in and always striving to remove, as they annoy me > as much as the next man. then remove most of those 22 false positives as a starter. I dont care if it's "hard/impossible" or not. If it cannot be coded like that, DONT output that particular type of check by default. Let people OPT IN if there's a reasonable chance for false positives. ( the same is true for gcc warnings: false positives are a huge PITA and they _CAUSE_ bugs because people have learned to ignore gcc warnings and will accidentally ignore real bugs too. ) Ingo -
From: Andy Whitcroft <apw@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 28, 9:21 am 2007 On Fri, Sep 28, 2007 at 12:49:35PM +0200, Ingo Molnar wrote: > > * Andy Whitcroft <apw@shadowen.org> wrote: > > > On Fri, Sep 28, 2007 at 11:39:02AM +0200, Ingo Molnar wrote: > > > > > And this is not about any particular false positive. I dont mind an > > > "advanced mode" non-default opt-in option for the script, if someone > > > is interested in borderline or hard to judge warnings too, but these > > > default false positives are _lethal_ for a tool like this. (and i > > > made this point before.) This is a _fundamental_ thing, and i'm > > > still not sure whether you accept and understand that point. This is > > > very basic and very important, and this isnt the first (or second) > > > time i raised this. > > > > You are striving for a level of perfection that is simply not > > achieveable. > > you _still_ fail to understand (let alone address), the fundamental > issues i raised many times. (see below for details) That is unfair. Every time we discuss it I state that I disagree that hiding mostly useful tests is a good thing. I would love the tests to be 100% accurate, but if I removed all the tests that can false positive I would literally have none. There is a balance to be struck and we have significantly different ideas on where the balance is. > > v8 is silent about sched.c because it is not checking very much of it, > > the most usable checkpatch.pl version was v6/v7. It went downhill after > that. Look at the script size versus the number of complaints about > kernel/sched.c: > > size # warnings > ---------------------------------------- > 25383 checkpatch.pl.v6 5 > 26038 checkpatch.pl.v7 6 > 29603 checkpatch.pl.v8 65 > 31160 checkpatch.pl.v9 24 > 34950 checkpatch.pl.v10 28 > > i.e. size did not increase all that significantly, still the number of > warnings has increased significantly - with little benefit. > > and here's the breakdown for v10: out of 28 warnings, only 6 are > legitimate! So the signal to noise ratio has worsened significantly > since v6. One warning per 300 lines of sched.c is _not manageable_. It > translates to _over 25 thousand false positives_ for the whole kernel. > > every false warning has additive costs: i will have to ignore it from > that point on, forever - and i frequently have to re-check the same > thing again, and again - just to discover that the warning is still > bogus. > > the mails from me in your mbox during the past few months should be > proof that i'm fully constructive regarding this matter and that i'm not > striving for 100% level of perfection. I'm simply stating the obvious: > your tool is less and less useful with every new version and more > troubling than that is your apparent inability to realize what this > whole issue is about. (see below for details) > > > I think it is clear that we differ on what should and should not be > > output by default. Clever people are able to opt out of the warnings, > > of things they think they dissagree with. It is the people with > > little experience who need the most guidance and those people who the > > tool should target by default. You cannot expect someone with no > > experience to know they need to add '--i-need-more-help' whereas _you_ > > I can expect to say '--leave-me-alone' or indeed to make the call that > > the output is plain wrong and _you_ know you should ignore it. > > you still dont get the point of this. This isnt about writing a tool > that 'can' find something to complain about. This whole kernel source > code quality task is about: > > _making kernel source code quality better_ > > not more, not less. If your tool outputs way too many false positives > and way too many unimportant borderline cases, people will ignore the > tool, and consequently YOU MAKE THE KERNEL'S SOURCE CODE WORSE than it > could be. How hard is that to understand?? Having zero (or near zero) > output from a checker mechanism is FUNDAMENTAL. > > ( and note that i was a goddamn early adopter of your tool, i'm a tester > and i gave you feedback, and i'm one of the few kernel hackers who > actually use your script as a mandatory component of their > patch-toolchain here and today. But your unchanged fundamentalistic > attitude has turned me from a happy supporter of checkpatch.pl into an > almost-opponent. If anything, that should be a warning shot for you. ) That is just stupid, I am no fundamentalist. I personally care not what tests there are or indeed if they are enabled by default. I personally feel you are more capable of turning off things you think are wrong, and as such the default should be to offer all of the tests. You disagree, that doesn't make either of us fundamentalist. > > Fundamentally I am not trying to help the people who are careful but > > those who do not know better. As for the false positives, those I am > > always interested in and always striving to remove, as they annoy me > > as much as the next man. > > then remove most of those 22 false positives as a starter. I dont care > if it's "hard/impossible" or not. If it cannot be coded like that, DONT > output that particular type of check by default. Let people OPT IN if > there's a reasonable chance for false positives. > > ( the same is true for gcc warnings: false positives are a huge PITA and > they _CAUSE_ bugs because people have learned to ignore gcc warnings > and will accidentally ignore real bugs too. ) Yes, but dispite that we don't just turn warnings off. Even though they produce false positives, as having them has some benefit. My contention is that checkpatch is following that same approach, risking some false positives to try and catch problems. Anyhow. I have already added a --check/--no-check option which controls the more subjective tests which will be in the next release; though its likely the option name will be something more useful by then. The only question is whether this should default to on. You are voting off. I personally think on. Andrew? Randy? Joel? -apw -
From: Andrew Morton <akpm@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 28, 1:46 pm 2007 On Fri, 28 Sep 2007 14:21:38 +0100 Andy Whitcroft <apw@shadowen.org> wrote: > On Fri, Sep 28, 2007 at 12:49:35PM +0200, Ingo Molnar wrote: > > > > * Andy Whitcroft <apw@shadowen.org> wrote: > > > > > On Fri, Sep 28, 2007 at 11:39:02AM +0200, Ingo Molnar wrote: > > > > > [bunfight] > oy, knock it off. > Anyhow. I have already added a --check/--no-check option which controls -strict? > the more subjective tests which will be in the next release; though its > likely the option name will be something more useful by then. > > The only question is whether this should default to on. You are voting > off. I personally think on. > > Andrew? Randy? Joel? > off, I'd say. That way people are more likely to use it. Or, more accurately, will have less excuses to not use it. -
From: Andy Whitcroft <apw@...> Subject: Re: [PATCH] update checkpatch.pl to version 0.10 Date: Sep 29, 5:22 am 2007 On Fri, Sep 28, 2007 at 10:46:42AM -0700, Andrew Morton wrote: > On Fri, 28 Sep 2007 14:21:38 +0100 Andy Whitcroft <apw@shadowen.org> wrote: > > > On Fri, Sep 28, 2007 at 12:49:35PM +0200, Ingo Molnar wrote: > > > > > > * Andy Whitcroft <apw@shadowen.org> wrote: > > > > > > > On Fri, Sep 28, 2007 at 11:39:02AM +0200, Ingo Molnar wrote: > > > > > > > > [bunfight] > > > > oy, knock it off. Really not trying to have a bunfight, honest. > > Anyhow. I have already added a --check/--no-check option which controls > > -strict? > > > the more subjective tests which will be in the next release; though its > > likely the option name will be something more useful by then. > > > > The only question is whether this should default to on. You are voting > > off. I personally think on. > > > > Andrew? Randy? Joel? > > > > off, I'd say. That way people are more likely to use it. Or, more > accurately, will have less excuses to not use it. Ok, then I think thats 2 for on and 3 for off. So off it is. I was tending towards --subjective for the tests which are err more subjective. --strict is good too. Perhaps I'll put both of those in as aliases. I will also review the tests which are warnings and checks (subjective) and see if any are now miss-categorised. -apw -


I've one idea very good :)

September 30, 2007 - 4:34pm
Anonymous (not verified)

In the config of the kernel, to put one option enabled by default to sendmail logs by UDP or MULTICAST of user's computers to e.g. http://capturinglogs.kernel.org/ while this load-balanced server is capturing massive logs from millions of linuxians.

The repairing and detecting of the kernel could be FAST, FAST, FAST, and A LOT MORE than before!!!!

As there are tools against spam, the same tools can be utilized to receive massive logs :)

10*365.25 = 3653 directories for 10 years :D

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary