linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@fifo99.com>
To: Krzysztof Halasa <khc@pm.waw.pl>
Cc: rostedt@goodmis.org, Andy Whitcroft <apw@canonical.com>,
	Li Zefan <lizf@cn.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] checkpatch: add a blacklist
Date: Wed, 07 Oct 2009 14:58:55 -0700	[thread overview]
Message-ID: <1254952735.18167.350.camel@desktop> (raw)
In-Reply-To: <m3my42uc24.fsf@intrepid.localdomain>

On Wed, 2009-10-07 at 23:30 +0200, Krzysztof Halasa wrote:
> Daniel Walker <dwalker@fifo99.com> writes:
> 
> > Just relax the submission rules so that checkpatch is basically an
> > optional part of the submission process. Adding that you don't actually
> > need to run it, you don't need a good reason not to follow the rules
> > etc.. Or expand on it to fully explain what you think the deal is or
> > should be.
> 
> Oh come on... The SubmittingPatches is a HOWTO-style document for people
> who want to get their patches merged. Obviously a common sense dictates
> you need a good reason to ignore this or that. "Looks better" and
> "I find it easier to work with" are good reasons since this is source
> code, for humans to work with.

The whole point of this black list is to allow people to give good
reasons why they don't follow the tool.. Once in the blacklist those
errors that are getting ignored become formally ignored.. So I haven't
been against people having a good reason not to fix the errors, but you
still need a good reason. I've checked 1000's of patches and Steven's
code is the only one that I've found which uniformly violates the coding
style ..

> BTW, the file says:
> 
> "Check your patches with the patch style checker prior to submission
> (scripts/checkpatch.pl).  The style checker should be viewed as
> a guide not as the final word.  If your code looks better with
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> a violation then its probably best left alone.

I think that exists since the tool can parse incorrectly sometimes and
flag things that it shouldn't be flagging (often times are checkpatch
defects).. For instance a large macro that only creates a function would
not need to be wrapped in a "do { } while(0);" .. So in those cases the
tool can't be the final word, this list (or a list) needs to be the
final word. Usually in those cases there is no need to explain the error
since it's clear what's happening in the code..

> The checker reports at three levels:
>  - ERROR: things that are very likely to be wrong
>                                ^^^^^^

Well, "very likely" is pretty strong wording for a this kind of tool ..

>  - WARNING: things requiring careful review
>  - CHECK: things requiring thought"
> 
> Only "very likely".
> 
> WRT tabs vs spaces, I wonder if using only spaces would be a better
> idea. Theoretically using tabs for syntactic indentation only is better,
> but the tools (editors) aren't up to the task yet.

You can usually change your editor to conform .. I know emacs usually
does spaces for tabs, but I'm sure you can change it's config to use
real tabs .. I don't use emacs tho.

Daniel


  reply	other threads:[~2009-10-07 22:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-22  2:14 [PATCH 1/5] checkpatch: fix false errors due to macro concatenation Daniel Walker
2009-09-22  2:14 ` [PATCH 2/5] checkpatch: fix hang in relative indent checking Daniel Walker
2009-09-22  2:14   ` [PATCH 3/5] checkpatch: add a blacklist Daniel Walker
2009-09-22  2:14     ` [PATCH 4/5] checkpatch: fix __attribute__ matching Daniel Walker
2009-09-22  2:14       ` [PATCH 5/5] checkpatch: fix false EXPORT_SYMBOL warning Daniel Walker
2009-09-30 17:46         ` Andy Whitcroft
2009-10-01 14:28           ` Daniel Walker
2009-10-02  7:39             ` Andy Whitcroft
2009-09-30 17:46       ` [PATCH 4/5] checkpatch: fix __attribute__ matching Andy Whitcroft
2009-10-01 14:26         ` Daniel Walker
2009-10-02  7:43           ` Andy Whitcroft
2009-09-22  6:29     ` [PATCH 3/5] checkpatch: add a blacklist Li Zefan
2009-09-30 15:27       ` Andy Whitcroft
2009-10-01 14:18         ` Daniel Walker
2009-10-06 19:51           ` Steven Rostedt
2009-10-06 20:50           ` Krzysztof Halasa
2009-10-07  3:52             ` Daniel Walker
2009-10-07 10:17               ` Krzysztof Halasa
2009-10-07 14:26                 ` Daniel Walker
2009-10-07 14:44                   ` Krzysztof Halasa
2009-10-07 14:57                     ` Daniel Walker
2009-10-07 15:11                       ` Alan Cox
2009-10-07 15:41                         ` Daniel Walker
2009-10-07 15:52                           ` Alan Cox
2009-10-07 16:11                             ` Daniel Walker
2009-10-07 15:08                   ` Steven Rostedt
2009-10-07 15:38                     ` Daniel Walker
2009-10-07 21:30                       ` Krzysztof Halasa
2009-10-07 21:58                         ` Daniel Walker [this message]
2009-09-30 15:24   ` [PATCH 2/5] checkpatch: fix hang in relative indent checking Andy Whitcroft
2009-09-30 17:46 ` [PATCH 1/5] checkpatch: fix false errors due to macro concatenation Andy Whitcroft
2009-10-01 14:20   ` Daniel Walker

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=1254952735.18167.350.camel@desktop \
    --to=dwalker@fifo99.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=khc@pm.waw.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=rostedt@goodmis.org \
    /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;
as well as URLs for NNTP newsgroup(s).