public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Oleg Drokin <green@linuxhacker.ru>, Andy Whitcroft <apw@canonical.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: checkpatch falsepositives in Lustre code
Date: Mon, 15 Feb 2016 16:56:29 -0800	[thread overview]
Message-ID: <1455584189.4046.28.camel@perches.com> (raw)
In-Reply-To: <1E5E2198-2E5C-4B6F-AAA5-C28E0A776714@linuxhacker.ru>

On Mon, 2016-02-15 at 18:49 -0500, Oleg Drokin wrote:
> Hello!
> 
> 
>    As I am going over Lustre to clean up the code style, I noticed this bunch below.
> 
>    Those all are function definitions, though I guess it might have been foiled by
>    return type on the previous line?
>    Now sure if anything could be done about this.
> 
>    Thanks.
> 
> ERROR: that open brace { should be on the previous line 
> #2098: FILE: drivers/staging/lustre/lustre/libcfs/hash.c:1358:
> +cfs_ash_for_each_enter(struct cfs_hash *hs)
> +{

[etc...]

Yeah, that's a defect of some type.

I'm not sure if it's really possible to handle it well though.

Maybe there could be a test added for something like

"^[\+ ](?:$Declare\s*|DeclareMisordered\s*)?\$Ident\("

to find what looks like function declarations in the
first column to avoid some of these false positives.

Andy?

       reply	other threads:[~2016-02-16  0:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1E5E2198-2E5C-4B6F-AAA5-C28E0A776714@linuxhacker.ru>
2016-02-16  0:56 ` Joe Perches [this message]
2016-02-16  1:57   ` checkpatch falsepositives in Lustre code Oleg Drokin
2016-02-16  2:27     ` Joe Perches
2016-02-16  2:45       ` Oleg Drokin
2016-02-16  3:05         ` Joe Perches
2016-02-16  3:12           ` Oleg Drokin

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=1455584189.4046.28.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=green@linuxhacker.ru \
    --cc=linux-kernel@vger.kernel.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