From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Whitcroft <apw@shadowen.org>,
Randy Dunlap <rdunlap@xenotime.net>,
Joel Schopp <jschopp@austin.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] update checkpatch.pl to version 0.10
Date: Fri, 28 Sep 2007 11:44:47 +0200 [thread overview]
Message-ID: <20070928094446.GB28455@elte.hu> (raw)
In-Reply-To: <20070928020132.f6c6f528.akpm@linux-foundation.org>
* 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
next prev parent reply other threads:[~2007-09-28 9:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-12 15:00 Andy Whitcroft
2007-09-28 8:40 ` Ingo Molnar
2007-09-28 9:01 ` Andrew Morton
2007-09-28 9:22 ` Andy Whitcroft
2007-09-28 9:39 ` Ingo Molnar
2007-09-28 10:00 ` Andy Whitcroft
2007-09-28 10:46 ` Christian Borntraeger
2007-09-28 11:03 ` WANG Cong
2007-09-28 14:19 ` Jan Engelhardt
2007-09-28 16:57 ` Randy Dunlap
2007-09-28 10:49 ` Ingo Molnar
2007-09-28 13:21 ` Andy Whitcroft
2007-09-28 13:37 ` Pekka Enberg
2007-09-28 14:02 ` Andy Whitcroft
2007-09-28 15:50 ` Joel Schopp
2007-09-28 17:26 ` Randy Dunlap
2007-09-28 17:46 ` Andrew Morton
2007-09-29 9:22 ` Andy Whitcroft
2007-10-05 5:56 ` Ingo Molnar
2007-09-28 16:51 ` Sam Ravnborg
2007-09-28 9:44 ` Ingo Molnar [this message]
2007-09-28 9:52 ` Andy Whitcroft
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070928094446.GB28455@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=apw@shadowen.org \
--cc=jschopp@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®