From: Rene Herman <rene.herman@gmail.com>
To: Andy Whitcroft <apw@shadowen.org>
Cc: Andrew Morton <akpm@linux-foundation.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.03
Date: Fri, 08 Jun 2007 12:08:54 +0200 [thread overview]
Message-ID: <46692AB6.1090604@gmail.com> (raw)
In-Reply-To: <466921F0.9020609@shadowen.org>
On 06/08/2007 11:31 AM, Andy Whitcroft wrote:
> Ok, the latest version 0.04 is released and I have also put up the
> complete script at:
>
> http://www.shadowen.org/~apw/public/checkpatch/checkpatch.pl-0.04
>
> Previous versions are also there.
Thank you. False positive:
do not use assignment in condition
#809: FILE: drivers/cdrom/mitsumi.c:766:
+ while ((req = elv_next_request(q))) {
Doing an assignment in a while (or for) condition like that makes perfect
sense. The check should probably be limited to if conditions -- you can
always split those.
Next:
struct mutex definition without comment
#173: FILE: drivers/cdrom/mitsumi.c:130:
+ struct mutex mutex;
Going overboard. It's the only locking primitive in the driver; the only
comment that could be added is something like "used for mutual exclusion"
which firmly falls into the "i++; /* increase i */" category. A bit further
on up in the driver, a:
/*
* LOCKING: mutex_lock(&mcd->mutex)
*/
is present just before the functions that need to be called with it held
(all, basically). I'd suggest simply dropping this check as its intention is
not something that can be usefully automated I feel. The tree would end up
with tons of useless comments that are there just to shut up the script.
And next a ton of:
labels should not be indented
#249: FILE: drivers/cdrom/mitsumi.c:206:
+ out:
This driver is putting two spaces in front of labels, as explained here:
http://lkml.org/lkml/2007/6/5/61
I do agree that putting them level aligned is a _significantly_ different
style, so perhaps it wants to warn if a label is not within the first indent
level (column 0-7) but if even that's contentious then this check should
perhaps go completely as well. One or two spaces, four for all I care, can
be considered a personal preference I feel.
Rene.
next prev parent reply other threads:[~2007-06-08 10:12 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-04 9:46 [PATCH] update checkpatch.pl to version 0.03 Andy Whitcroft
2007-06-04 9:55 ` [PATCH] update feature-removal-schedule.txt to include deprecated functions Andy Whitcroft
2007-06-04 15:49 ` [PATCH] update checkpatch.pl to version 0.03 jschopp
2007-06-04 16:51 ` Andy Whitcroft
2007-06-04 17:22 ` jschopp
2007-06-05 18:45 ` Andy Whitcroft
2007-06-05 9:56 ` Andy Whitcroft
2007-06-04 16:25 ` Jan Engelhardt
2007-06-04 18:41 ` Andrew Morton
2007-06-04 19:08 ` Andy Whitcroft
2007-06-04 19:08 ` Rene Herman
2007-06-04 20:04 ` Randy Dunlap
2007-06-05 18:39 ` Andy Whitcroft
2007-06-08 9:31 ` Andy Whitcroft
2007-06-08 10:08 ` Rene Herman [this message]
2007-06-05 8:14 ` Heiko Carstens
2007-06-06 9:05 ` Jesper Juhl
2007-06-07 14:28 ` Jan Engelhardt
2007-06-07 14:39 ` Jesper Juhl
2007-06-07 19:34 ` Adrian Bunk
2007-06-07 22:22 ` Alan Cox
2007-06-07 23:21 ` Adrian Bunk
2007-06-07 23:41 ` Alan Cox
2007-06-08 0:04 ` Adrian Bunk
2007-06-08 4:37 ` Jon Masters
2007-06-08 8:58 ` Jan-Benedict Glaw
2007-06-08 10:52 ` Alan Cox
2007-06-08 12:39 ` Adrian Bunk
2007-06-08 14:34 ` Jesper Juhl
2007-06-08 14:42 ` Adrian Bunk
2007-06-08 15:16 ` Jan Engelhardt
2007-06-08 15:37 ` Jon Masters
2007-06-08 15:42 ` Alan Cox
2007-06-08 16:39 ` Adrian Bunk
2007-06-08 18:43 ` Jan Engelhardt
2007-06-08 16:03 ` Roland Dreier
2007-06-07 23:49 ` Adrian Bunk
2007-06-07 19:32 ` Adrian Bunk
2007-06-07 22:18 ` Alan Cox
2007-06-06 11:49 ` Jesper Juhl
2007-06-07 11:46 ` Andy Whitcroft
2007-06-07 11:52 ` Jesper Juhl
2007-06-07 15:16 ` checkpatch.pl: should be executable Andy Whitcroft
2007-06-07 15:33 ` jschopp
2007-06-07 14:22 ` [PATCH] update checkpatch.pl to version 0.03 Jan Engelhardt
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=46692AB6.1090604@gmail.com \
--to=rene.herman@gmail.com \
--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