netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	apw@canonical.com, devel@linuxdriverproject.org,
	Andrew Morton <akpm@linux-foundation.org>,
	David Miller <davem@davemloft.net>
Subject: Re: Treewide frequency of various checkpatch messages
Date: Mon, 10 Mar 2014 11:48:50 -0700	[thread overview]
Message-ID: <1394477330.24244.34.camel@joe-AO722> (raw)
In-Reply-To: <20140310165046.GA12687@kroah.com>

On Mon, 2014-03-10 at 09:50 -0700, Greg KH wrote:
> On Mon, Mar 10, 2014 at 09:02:26AM -0700, Joe Perches wrote:
> > On Fri, 2014-03-07 at 01:30 -0800, Joe Perches wrote:
> > > On Fri, 2014-03-07 at 10:54 +0300, Dan Carpenter wrote:
> >  (a question about a new message warning of a missing
> >   blank line between variable declaration blocks and
> >   code in a function)
> > > > How many warnings does this generate does this generate when you run it
> > > > across the whole tree?
> > > A lot.
> > 
> > Turns out it's 20,210 and it's the 14th
> > most common checkpatch message type.
> > 
> >     14    20210  WARNING:SPACING: Missing a blank line after declarations
> 
> I think it's still worthwhile to clean up.

Maybe.

Luckily, <smile> I don't have to deal with the
patches that would be generated by this message.

Some people are going to view patches for this as
useless noise.

Couple of things:

It's kind of interesting how the messages vary by
subsystem.  Let me know if you want any breakdowns.

And there are a small number of false positives for
this "Missing a blank line" test with declarations
like:

	typedef *foo;
	DECLARE_BITMAP(foo);
	__DECL_REG(foo);
	LIST_HEAD(foo);

So there could be a minor improvement to the test.

I looked at some of the results using:

This sort of match stands out a bit:

---> arch/tile/lib/spinlock_32.c:68:
{
        u32 iterations = 0;
        while (arch_spin_is_locked(lock))
                delay_backoff(iterations++);
}

Instances like this may be fine, but adding blank
lines to very short functions with a single
declaration just adds to the overall line count.

I've no strong opinion of the need to write code
like:

{
        u32 iterations = 0;

        while (arch_spin_is_locked(lock))
                delay_backoff(iterations++);
}

  reply	other threads:[~2014-03-10 18:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06 11:12 [PATCH 0/6] Drivers: net: hyperv: Enable various offloads K. Y. Srinivasan
2014-03-06 11:13 ` [PATCH 1/6] Drivers: net: hyperv: Enable scatter gather I/O K. Y. Srinivasan
2014-03-06 11:13   ` [PATCH 2/6] Drivers: net: hyperv: Cleanup the send path K. Y. Srinivasan
2014-03-06 19:30     ` David Miller
2014-03-06 11:13   ` [PATCH 3/6] Drivers: net: hyperv: Enable offloads on the host K. Y. Srinivasan
2014-03-06 19:31     ` David Miller
2014-03-06 19:36     ` Dan Carpenter
2014-03-06 11:13   ` [PATCH 4/6] Drivers: net: hyperv: Enable receive side IP checksum offload K. Y. Srinivasan
2014-03-06 19:31     ` David Miller
2014-03-06 11:13   ` [PATCH 5/6] Drivers: net: hyperv: Enable send side " K. Y. Srinivasan
2014-03-06 19:33     ` David Miller
2014-03-06 20:29       ` KY Srinivasan
2014-03-06 20:48         ` David Miller
2014-03-06 21:00           ` KY Srinivasan
2014-03-09 18:53     ` Ben Hutchings
2014-03-06 11:13   ` [PATCH 6/6] Drivers: net: hyperv: Enable large send offload K. Y. Srinivasan
2014-03-06 19:34     ` David Miller
2014-03-06 19:29   ` [PATCH 1/6] Drivers: net: hyperv: Enable scatter gather I/O David Miller
2014-03-06 23:28     ` [PATCH] checkpatch: net and drivers/net: Warn on missing blank line after variable declaration Joe Perches
2014-03-06 23:35       ` Andrew Morton
2014-03-06 23:42         ` Joe Perches
2014-03-06 23:55           ` Andrew Morton
2014-03-07  0:11             ` [PATCH] checkpatch: Always warn on missing blank line after variable declaration block Joe Perches
2014-03-07  7:54       ` [PATCH] checkpatch: net and drivers/net: Warn on missing blank line after variable declaration Dan Carpenter
2014-03-07  9:30         ` Joe Perches
2014-03-10 16:02           ` Treewide frequency of various checkpatch messages Joe Perches
2014-03-10 16:50             ` Greg KH
2014-03-10 18:48               ` Joe Perches [this message]
2014-03-10 19:33                 ` Greg KH
2014-03-10 20:11                   ` Joe Perches

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=1394477330.24244.34.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=davem@davemloft.net \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).