* [PATCH 1/2] audit: remove duplicate export of audit_enabled
@ 2013-04-12 9:34 Gao feng
2013-04-12 9:34 ` [PATCH 2/2] audit: remove unnecessary #if CONFIG_AUDIT Gao feng
0 siblings, 1 reply; 3+ messages in thread
From: Gao feng @ 2013-04-12 9:34 UTC (permalink / raw)
To: viro, eparis; +Cc: linux-kernel, linux-audit, akpm, Gao feng
audit_enabled has already been exported in
include/linux/audit.h. and kernel/audit.h
includes include/linux/audit.h, no need to
export aduit_enabled again in kernel/audit.h
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
kernel/audit.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/audit.h b/kernel/audit.h
index d51cba8..d06ffc1 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -60,7 +60,6 @@ struct audit_entry {
};
#ifdef CONFIG_AUDIT
-extern int audit_enabled;
extern int audit_ever_enabled;
#endif
--
1.8.1.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] audit: remove unnecessary #if CONFIG_AUDIT
2013-04-12 9:34 [PATCH 1/2] audit: remove duplicate export of audit_enabled Gao feng
@ 2013-04-12 9:34 ` Gao feng
2013-04-15 21:02 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Gao feng @ 2013-04-12 9:34 UTC (permalink / raw)
To: viro, eparis; +Cc: linux-kernel, linux-audit, akpm, Gao feng
The files include kernel/audit.h are complied only
when CONFIG_AUDIT is set.
Just like audit_pid,there is no need to surround
audit_ever_enabled with CONFIG_AUDIT.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
kernel/audit.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/audit.h b/kernel/audit.h
index d06ffc1..11468d9 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -59,9 +59,7 @@ struct audit_entry {
struct audit_krule rule;
};
-#ifdef CONFIG_AUDIT
extern int audit_ever_enabled;
-#endif
extern int audit_pid;
--
1.8.1.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] audit: remove unnecessary #if CONFIG_AUDIT
2013-04-12 9:34 ` [PATCH 2/2] audit: remove unnecessary #if CONFIG_AUDIT Gao feng
@ 2013-04-15 21:02 ` Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2013-04-15 21:02 UTC (permalink / raw)
To: Gao feng; +Cc: viro, eparis, linux-kernel, linux-audit
On Fri, 12 Apr 2013 17:34:21 +0800 Gao feng <gaofeng@cn.fujitsu.com> wrote:
> The files include kernel/audit.h are complied only
> when CONFIG_AUDIT is set.
>
> Just like audit_pid,there is no need to surround
> audit_ever_enabled with CONFIG_AUDIT.
>
> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
> ---
> kernel/audit.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/audit.h b/kernel/audit.h
> index d06ffc1..11468d9 100644
> --- a/kernel/audit.h
> +++ b/kernel/audit.h
> @@ -59,9 +59,7 @@ struct audit_entry {
> struct audit_krule rule;
> };
>
> -#ifdef CONFIG_AUDIT
> extern int audit_ever_enabled;
> -#endif
>
> extern int audit_pid;
Well actually there's no need to put the ifdefs around such an extern
declaration at all. The one small downside to omitting the ifdefs is
that a programming mistake may then be revealed at link-time instead of
at compile-time. But we very often omit the ifdefs, because reducing visual
clutter is more important.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-15 21:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-12 9:34 [PATCH 1/2] audit: remove duplicate export of audit_enabled Gao feng
2013-04-12 9:34 ` [PATCH 2/2] audit: remove unnecessary #if CONFIG_AUDIT Gao feng
2013-04-15 21:02 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®