mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Gao feng <gaofeng@cn.fujitsu.com>
Cc: viro@zeniv.linux.org.uk, eparis@redhat.com,
	linux-kernel@vger.kernel.org, linux-audit@redhat.com
Subject: Re: [PATCH 2/2] audit: remove unnecessary #if CONFIG_AUDIT
Date: Mon, 15 Apr 2013 14:02:30 -0700	[thread overview]
Message-ID: <20130415140230.60917c685decaeb2b7fb0452@linux-foundation.org> (raw)
In-Reply-To: <1365759261-21927-2-git-send-email-gaofeng@cn.fujitsu.com>

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.



      reply	other threads:[~2013-04-15 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20130415140230.60917c685decaeb2b7fb0452@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=eparis@redhat.com \
    --cc=gaofeng@cn.fujitsu.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®