public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Joe Perches <joe@perches.com>,
	David Howells <dhowells@redhat.com>,
	Andy Whitcroft <apw@canonical.com>,
	ksummit-2013-discuss@lists.linuxfoundation.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <m.chehab@samsung.com>,
	Wang Shilong <wangshilong1991@gmail.com>
Subject: Re: [Ksummit-2013-discuss] [PATCH] checkpatch: Add comment about updating Documentation/CodingStyle
Date: Mon, 2 Sep 2013 18:34:08 -0700	[thread overview]
Message-ID: <20130903013408.GA3437@leaf> (raw)
In-Reply-To: <20130903003958.GA6855@localhost>

On Tue, Sep 03, 2013 at 08:39:58AM +0800, Fengguang Wu wrote:
> On Mon, Sep 02, 2013 at 02:11:36PM -0700, Joe Perches wrote:
> > On Mon, 2013-09-02 at 21:50 +0100, David Howells wrote:
> > > Josh Triplett <josh@joshtriplett.org> wrote:
> > > 
> > > > > There are many checkpatch rules (like semicolons) that
> > > > > are not in CodingStyle.
> > > > 
> > > > It's a rule of thumb, not a mandate.  In *general*, checkpatch.pl should
> > > > not be enforcing style rules that aren't documented in CodingStyle.
> > > 
> > > Except that it becomes a mandate when someone runs it automatically against
> > > every one of your patches and then sends you an email for each patch it finds
> > > a checkpatch niggle against...
> > 
> > I think that any robot sending such checkpatch-only
> > emails should be disabled.
> > 
> > I know of 2 email robots.
> > 
> > Fengguang Wu's very useful build robot
> > sends out emails on build failures.
> > I think that's great.
> 
> Thanks! Yes I'm now running checkpatch these days because some people
> suggested to me that some of the checkpatch warnings do help catch
> real bugs.
> 
> However I do try to avoid upsetting people with maybe-subjective
> warnings. A checkpatch report will only be sent when a small fraction
> of error types are detected. Comments are very welcome on how to
> improve this list:
> 
> MEMSET
> IN_ATOMIC
> UAPI_INCLUDE
> MALFORMED_INCLUDE       
> SIZEOF_ADDRESS  
> KREALLOC_ARG_REUSE      
> EXECUTE_PERMISSIONS     
> ERROR:BAD_SIGN_OFF      
> LO_MACRO
> HI_MACRO
> CSYNC
> SSYNC
> HOTPLUG_SECTION
> INDENTED_LABEL
> INLINE_LOCATION
> STORAGE_CLASS
> USLEEP_RANGE
> UNNECESSARY_CASTS
> ALLOC_SIZEOF_STRUCT
> KREALLOC_ARG_REUSE
> USE_FUNC
> LOCKDEP
> EXPORTED_WORLD_WRITABLE
> WHITESPACE_AFTER_LINE_CONTINUATION
> MISSING_VMLINUX_SYMBOL
> NEEDLESS_IF
> PRINTF_L

Looks like you have KREALLOC_ARG_REUSE in that list twice.

Other than that, those look sensible.  I'd suggest a couple more, which
*should* always make sense, and to the best of my knowledge don't tend
to generate false positives:

C99_COMMENTS
CONFIG_EXPERIMENTAL
CVS_KEYWORD
ELSE_AFTER_BRACE
GLOBAL_INITIALIZERS
INITIALISED_STATIC
INVALID_UTF8
LINUX_VERSION_CODE
MISSING_EOF_NEWLINE
PREFER_SEQ_PUTS
PRINTK_WITHOUT_KERN_LEVEL
REDUNDANT_CODE
RETURN_PARENTHESES
SIZEOF_PARENTHESIS
SPACE_BEFORE_TAB
TRAILING_SEMICOLON
TRAILING_WHITESPACE
USE_DEVICE_INITCALL
USE_RELATIVE_PATH

These *ought* to make sense, but I don't know their false positive rates:

HEXADECIMAL_BOOLEAN_TEST
ALLOC_ARRAY_ARGS
CONSIDER_KSTRTO
CONST_STRUCT
SPLIT_STRING

The following almost always make sense, but only on patches not
yet applied to a tree:

PATCH_PREFIX
MODIFIED_INCLUDE_ASM
CORRUPTED_PATCH
NOT_UNIFIED_DIFF
MISSING_SIGN_OFF

- Josh Triplett

  parent reply	other threads:[~2013-09-03  1:34 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9976.1378132260@warthog.procyon.org.uk>
2013-09-02 16:10 ` Making changes to the Coding Style Joe Perches
2013-09-02 18:15   ` [Ksummit-2013-discuss] " Josh Triplett
2013-09-02 18:19     ` [PATCH] checkpatch: Add comment about updating Documentation/CodingStyle Josh Triplett
2013-09-02 18:39       ` [Ksummit-2013-discuss] " Mauro Carvalho Chehab
2013-09-02 18:59         ` Joe Perches
2013-09-02 19:48           ` Mauro Carvalho Chehab
2013-09-02 19:50           ` Josh Triplett
2013-09-02 20:04             ` Guenter Roeck
2013-09-02 22:14               ` [PATCH] checkpatch: Report missing spaces around trigraphs with --strict Joe Perches
2013-09-02 23:15                 ` Josh Triplett
2013-09-02 23:54                   ` Joe Perches
2013-09-03  0:32                     ` Josh Triplett
2013-09-02 20:50             ` [Ksummit-2013-discuss] [PATCH] checkpatch: Add comment about updating Documentation/CodingStyle David Howells
2013-09-02 21:11               ` Joe Perches
2013-09-03  0:26                 ` Shilong Wang
2013-09-03  0:36                   ` Josh Triplett
2013-09-03  1:21                     ` Fengguang Wu
2013-09-03  0:39                 ` Fengguang Wu
2013-09-03  0:47                   ` Joe Perches
2013-09-03  1:35                     ` Fengguang Wu
2013-09-03  1:34                   ` Josh Triplett [this message]
2013-09-03  1:52                     ` Joe Perches
2013-09-03  2:12                       ` Josh Triplett
2013-09-03  2:21                         ` Joe Perches
2013-09-03  2:46                       ` Fengguang Wu
2013-09-03  3:16                         ` Josh Triplett
2013-09-03  3:22                           ` Fengguang Wu
2013-09-03 18:09                   ` Bjorn Helgaas
2013-09-04  0:49                     ` Fengguang Wu
2013-09-02 22:08               ` Josh Triplett
2013-09-02 19:34         ` Josh Triplett
2013-09-02 19:40       ` [PATCH] checkpatch: Add warning about submitting patches using --file Joe Perches
2013-09-02 19:54         ` [Ksummit-2013-discuss] " Mauro Carvalho Chehab
2013-09-02 19:56         ` Josh Triplett
2013-09-02 20:37         ` Dan Carpenter
2013-09-02 21:51           ` Joe Perches
2013-09-17 21:33           ` Andrew Morton

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=20130903013408.GA3437@leaf \
    --to=josh@joshtriplett.org \
    --cc=apw@canonical.com \
    --cc=dhowells@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=joe@perches.com \
    --cc=ksummit-2013-discuss@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=torvalds@linux-foundation.org \
    --cc=wangshilong1991@gmail.com \
    /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