public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: YueHaibing <yuehaibing@huawei.com>
To: Paul Moore <paul@paul-moore.com>
Cc: Eric Paris <eparis@redhat.com>,
	linux-kernel@vger.kernel.org, linux-audit@redhat.com
Subject: Re: [PATCH -next] audit: remove duplicated include from audit.c
Date: Fri, 14 Dec 2018 09:33:49 +0800	[thread overview]
Message-ID: <fbe38a4d-9922-e2c2-76bb-0e110d4e678f@huawei.com> (raw)
In-Reply-To: <CAHC9VhSCnZ4HfqA5ZR3xEzrofGZobLhbHr_N2OftkzW=Z6Q_YQ@mail.gmail.com>

On 2018/12/14 7:42, Paul Moore wrote:
> On Sun, Dec 9, 2018 at 1:25 AM YueHaibing <yuehaibing@huawei.com> wrote:
>> Remove duplicated include.
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>>  kernel/audit.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/kernel/audit.c b/kernel/audit.c
>> index a0a4544..632d360 100644
>> --- a/kernel/audit.c
>> +++ b/kernel/audit.c
>> @@ -60,7 +60,6 @@
>>  #include <linux/mutex.h>
>>  #include <linux/gfp.h>
>>  #include <linux/pid.h>
>> -#include <linux/slab.h>
> 
> As discussed previously, I don't want to remove header files whose
> declarations are used in the source file.  While it may be true that
> slab.h is included in one of the previously included header files, I
> like leaving it as an explicit include to help document the dependency
> and protect us from changes in the other header files.

The slab.h is included twice in audit.c , It like this:

#include <linux/file.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/atomic.h>
#include <linux/mm.h>
#include <linux/export.h>
#include <linux/slab.h>		//the first
#include <linux/err.h>
#include <linux/kthread.h>
#include <linux/kernel.h>
#include <linux/syscalls.h>
#include <linux/spinlock.h>
#include <linux/rcupdate.h>
#include <linux/mutex.h>
#include <linux/gfp.h>
#include <linux/pid.h>
#include <linux/slab.h>    //duplicated


> 
> --
> paul moore
> www.paul-moore.com
> 
> 

  reply	other threads:[~2018-12-14  1:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-09  6:25 [PATCH -next] audit: remove duplicated include from audit.c YueHaibing
2018-12-13 23:42 ` Paul Moore
2018-12-14  1:33   ` YueHaibing [this message]
2018-12-14 17:14     ` 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=fbe38a4d-9922-e2c2-76bb-0e110d4e678f@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=eparis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@paul-moore.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