linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Richard Guy Briggs <rgb@redhat.com>
Cc: Scott Matheina <scott@matheina.com>,
	Paul Moore <paul@paul-moore.com>,
	linux-audit@redhat.com, trivial@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Fixed Trivial Warnings in file: Deleted Spaces prior to tabs, and added lines. modified: kernel/auditfilter.c
Date: Tue, 27 Oct 2015 12:54:32 -0700	[thread overview]
Message-ID: <1445975672.2757.51.camel@perches.com> (raw)
In-Reply-To: <20151022021500.GD5269@madcap2.tricolour.ca>

On Wed, 2015-10-21 at 22:15 -0400, Richard Guy Briggs wrote:
> On 15/10/21, Scott Matheina wrote:
> > On 10/21/2015 10:33 AM, Richard Guy Briggs wrote:
> > > On 15/10/21, Joe Perches wrote:
> > >> On Mon, 2015-10-19 at 12:10 -0400, Richard Guy Briggs wrote:
> > >>> On 15/10/18, Scott Matheina wrote:
> > >>>> On 10/14/2015 04:54 PM, Paul Moore wrote:
> > >>>>> On Saturday, October 10, 2015 08:57:55 PM Scott Matheina wrote:
> > >> []
> > >>>>>> diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
> > >> []
> > >>>>>> @@ -109,6 +109,7 @@ void audit_free_rule_rcu(struct rcu_head *head)
> > >>>>>>  {
> > >>>>>>  	struct audit_entry *e = container_of(head, struct audit_entry, rcu);
> > >>>>>>  	audit_free_rule(e);
> > >>>>>> +
> > >>>>>>  }
> > >>>>> Why?
> > >>>> I was following the error messages in checkpatch.pl, but the warning
> > >>>> went away after adding this line. No problem with the code. 
> > >>> That sounds like a bug in checkpatch.pl, since that blank line should be
> > >>> tween the declaration and the function call.
> > >> checkpatch message asks for a blank line after the
> > >> "struct audit_entry *e = ..." declaration.
> > > Well then maybe it is a bug in his interpretation of the output of
> > > checkpatch.pl?  Scott, did you re-run checkpatch.pl after adding those
> > > spaces?  Did it pass?
> > 
> > The error did go away. 
> 
> Joe, I confirm the error went away.  Looks like a bug in checkpatch.pl
> to me.

It's not a bug in checkpatch.

checkpatch doesn't care if there are blank lines between declarations.

Here's the output of checkpatch for this area:

WARNING: Missing a blank line after declarations
#111: FILE: kernel/auditfilter.c:111:
+	struct audit_entry *e = container_of(head, struct audit_entry, rcu);
+	audit_free_rule(e);

That doesn't suggest putting a blank line before line 111.
It suggests putting a blank line after the declaration of e.




  parent reply	other threads:[~2015-10-27 19:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-11  1:57 [PATCH 2/2] Fixed Trivial Warnings in file: Deleted Spaces prior to tabs, and added lines. modified: kernel/auditfilter.c Scott Matheina
2015-10-14 21:54 ` Paul Moore
2015-10-18 17:50   ` Scott Matheina
2015-10-19 16:10     ` Richard Guy Briggs
2015-10-21 13:58       ` Joe Perches
2015-10-21 15:33         ` Richard Guy Briggs
2015-10-22  0:30           ` Scott Matheina
2015-10-22  2:15             ` Richard Guy Briggs
2015-10-22  3:27               ` Scott Matheina
2015-10-22 12:53                 ` Richard Guy Briggs
2015-10-25 23:53               ` Scott Matheina
2015-10-27 19:54               ` Joe Perches [this message]
2015-10-21 18:23     ` Paul Moore
2015-10-22  0:35       ` Scott Matheina
2015-10-22 20:47         ` Paul Moore

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=1445975672.2757.51.camel@perches.com \
    --to=joe@perches.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=rgb@redhat.com \
    --cc=scott@matheina.com \
    --cc=trivial@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).