lkml.org 
[lkml]   [2015]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] Fixed Trivial Warnings in file: Deleted Spaces prior to tabs, and added lines. modified: kernel/auditfilter.c
From
Date
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.





\
 
 \ /
  Last update: 2015-10-27 21:01    [W:0.125 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site