linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] audit: remove duplicated include from audit.c
@ 2018-12-09  6:25 YueHaibing
  2018-12-13 23:42 ` Paul Moore
  0 siblings, 1 reply; 8+ messages in thread
From: YueHaibing @ 2018-12-09  6:25 UTC (permalink / raw)
  To: paul, eparis; +Cc: linux-kernel, linux-audit, YueHaibing

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>
 
 #include <linux/audit.h>
 
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] audit: remove duplicated include from audit.c
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Moore @ 2018-12-13 23:42 UTC (permalink / raw)
  To: yuehaibing; +Cc: Eric Paris, linux-kernel, linux-audit

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.

--
paul moore
www.paul-moore.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] audit: remove duplicated include from audit.c
  2018-12-13 23:42 ` Paul Moore
@ 2018-12-14  1:33   ` YueHaibing
  2018-12-14 17:14     ` Paul Moore
  0 siblings, 1 reply; 8+ messages in thread
From: YueHaibing @ 2018-12-14  1:33 UTC (permalink / raw)
  To: Paul Moore; +Cc: Eric Paris, linux-kernel, linux-audit

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
> 
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] audit: remove duplicated include from audit.c
  2018-12-14  1:33   ` YueHaibing
@ 2018-12-14 17:14     ` Paul Moore
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Moore @ 2018-12-14 17:14 UTC (permalink / raw)
  To: yuehaibing; +Cc: Eric Paris, linux-kernel, linux-audit

On Thu, Dec 13, 2018 at 8:33 PM YueHaibing <yuehaibing@huawei.com> wrote:
> 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:

Yes, you're right - my apologies.  I mistakenly thought this was a
patch similar to the ones you sent earlier and were rejected; I should
have looked closer at this patch.

Normally I wouldn't merge non-critical stuff at this stage of the
development window, but since this is such a trivial patch, and easily
verified, I'm going to go ahead and merge this into audit/next.

Thank you.

-- 
paul moore
www.paul-moore.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] audit: remove duplicated include from audit.c
  2013-04-12  3:28   ` yongjun_wei
@ 2013-04-12 13:32     ` Eric Paris
  0 siblings, 0 replies; 8+ messages in thread
From: Eric Paris @ 2013-04-12 13:32 UTC (permalink / raw)
  To: yongjun wei; +Cc: Wei Yongjun, linux-kernel

Came in via the net-next tree from commit 941912133025926307c7a65b203fa38403b1063a

I'll ping dmiller and friends.

----- Original Message -----
> Hi Eric,
> 
> Sorry reply on top.
> 
> From the source code from linex-next.git tree, line 55~64:
> 
> #include <net/sock.h>
> #include <net/netlink.h>            *******
> #include <linux/skbuff.h>
> #ifdef CONFIG_SECURITY
> #include <linux/security.h>
> #endif
> #include <net/netlink.h>            *******
> #include <linux/freezer.h>
> #include <linux/tty.h>
> #include <linux/pid_namespace.h>
> 
> net/netlink.h is included twice, and linux/netlink.h is not included by this
> file.
> 
> -----Original Message-----
> From: Eric Paris [mailto:eparis@redhat.com]
> Sent: 2013年4月11日 1:26
> To: Wei Yongjun
> Cc: viro@zeniv.linux.org.uk; Yongjun Wei (RD-CN);
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH -next] audit: remove duplicated include from audit.c
> 
> net/netlink.h includes linux/netlink.h but linux/netlink.h does not include
> net/netlink.h
> 
> since the audit code uses the nlmsg_* functions provided in net/netlink.h it
> seems we need this include.
> 
> since the audit code uses netlink_unicast provided in linux/netlink.h it
> seems we need that include.
> 
> I don't see duplication even if by chance one of them would have included the
> other...
> 
> ----- Original Message -----
> > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> > 
> > Remove duplicated include.
> > 
> > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> > ---
> >  kernel/audit.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/kernel/audit.c b/kernel/audit.c index 488f85f..9377913
> > 100644
> > --- a/kernel/audit.c
> > +++ b/kernel/audit.c
> > @@ -58,7 +58,6 @@
> >  #ifdef CONFIG_SECURITY
> >  #include <linux/security.h>
> >  #endif
> > -#include <net/netlink.h>
> >  #include <linux/freezer.h>
> >  #include <linux/tty.h>
> >  #include <linux/pid_namespace.h>
> > 
> > 
> 
> <table class="TM_EMAIL_NOTICE"><tr><td><pre>
> TREND MICRO EMAIL NOTICE
> The information contained in this email and any attachments is confidential
> and may be subject to copyright or other intellectual property protection.
> If you are not the intended recipient, you are not authorized to use or
> disclose this information, and we request that you notify us by reply mail or
> telephone and delete the original message from your mail system.
> </pre></td></tr></table>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH -next] audit: remove duplicated include from audit.c
  2013-04-10 17:26 ` Eric Paris
@ 2013-04-12  3:28   ` yongjun_wei
  2013-04-12 13:32     ` Eric Paris
  0 siblings, 1 reply; 8+ messages in thread
From: yongjun_wei @ 2013-04-12  3:28 UTC (permalink / raw)
  To: Eric Paris, Wei Yongjun; +Cc: viro, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2316 bytes --]

Hi Eric,

Sorry reply on top.

>From the source code from linex-next.git tree, line 55~64:

#include <net/sock.h>
#include <net/netlink.h>            *******
#include <linux/skbuff.h>
#ifdef CONFIG_SECURITY
#include <linux/security.h>
#endif
#include <net/netlink.h>            *******
#include <linux/freezer.h>
#include <linux/tty.h>
#include <linux/pid_namespace.h>

net/netlink.h is included twice, and linux/netlink.h is not included by this file.

-----Original Message-----
From: Eric Paris [mailto:eparis@redhat.com] 
Sent: 2013年4月11日 1:26
To: Wei Yongjun
Cc: viro@zeniv.linux.org.uk; Yongjun Wei (RD-CN); linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] audit: remove duplicated include from audit.c

net/netlink.h includes linux/netlink.h but linux/netlink.h does not include net/netlink.h

since the audit code uses the nlmsg_* functions provided in net/netlink.h it seems we need this include.

since the audit code uses netlink_unicast provided in linux/netlink.h it seems we need that include.

I don't see duplication even if by chance one of them would have included the other...

----- Original Message -----
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Remove duplicated include.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  kernel/audit.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/kernel/audit.c b/kernel/audit.c index 488f85f..9377913 
> 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -58,7 +58,6 @@
>  #ifdef CONFIG_SECURITY
>  #include <linux/security.h>
>  #endif
> -#include <net/netlink.h>
>  #include <linux/freezer.h>
>  #include <linux/tty.h>
>  #include <linux/pid_namespace.h>
> 
> 

<table class="TM_EMAIL_NOTICE"><tr><td><pre>
TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential 
and may be subject to copyright or other intellectual property protection. 
If you are not the intended recipient, you are not authorized to use or 
disclose this information, and we request that you notify us by reply mail or
telephone and delete the original message from your mail system.
</pre></td></tr></table>ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH -next] audit: remove duplicated include from audit.c
  2013-04-04  1:17 Wei Yongjun
@ 2013-04-10 17:26 ` Eric Paris
  2013-04-12  3:28   ` yongjun_wei
  0 siblings, 1 reply; 8+ messages in thread
From: Eric Paris @ 2013-04-10 17:26 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: viro, yongjun wei, linux-kernel

net/netlink.h includes linux/netlink.h but linux/netlink.h does not include net/netlink.h

since the audit code uses the nlmsg_* functions provided in net/netlink.h it seems we need this include.

since the audit code uses netlink_unicast provided in linux/netlink.h it seems we need that include.

I don't see duplication even if by chance one of them would have included the other...

----- Original Message -----
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Remove duplicated include.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  kernel/audit.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 488f85f..9377913 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -58,7 +58,6 @@
>  #ifdef CONFIG_SECURITY
>  #include <linux/security.h>
>  #endif
> -#include <net/netlink.h>
>  #include <linux/freezer.h>
>  #include <linux/tty.h>
>  #include <linux/pid_namespace.h>
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH -next] audit: remove duplicated include from audit.c
@ 2013-04-04  1:17 Wei Yongjun
  2013-04-10 17:26 ` Eric Paris
  0 siblings, 1 reply; 8+ messages in thread
From: Wei Yongjun @ 2013-04-04  1:17 UTC (permalink / raw)
  To: viro, eparis; +Cc: yongjun_wei, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 kernel/audit.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 488f85f..9377913 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -58,7 +58,6 @@
 #ifdef CONFIG_SECURITY
 #include <linux/security.h>
 #endif
-#include <net/netlink.h>
 #include <linux/freezer.h>
 #include <linux/tty.h>
 #include <linux/pid_namespace.h>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-12-14 17:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-12-14 17:14     ` Paul Moore
  -- strict thread matches above, loose matches on Subject: below --
2013-04-04  1:17 Wei Yongjun
2013-04-10 17:26 ` Eric Paris
2013-04-12  3:28   ` yongjun_wei
2013-04-12 13:32     ` Eric Paris

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).