From: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Cc: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
Subject: [PATCH 3/3] Restrict definition of a static function in kernel/auditsc.c
Date: Wed, 18 Mar 2009 23:49:27 +0200 [thread overview]
Message-ID: <1237412967-20754-3-git-send-email-dmitri.vorobiev@movial.com> (raw)
In-Reply-To: <1237412967-20754-2-git-send-email-dmitri.vorobiev@movial.com>
The function 'audit_set_auditable' in kernel/auditsc.c is called
only when the CONFIG_AUDIT_TREE option is set. Therefore, the
following warning may be produced:
kernel/auditsc.c:745: warning: 'audit_set_auditable' defined but not used
This patch fixes the warning by moving the function definition under an
appropriate preprocessor construct.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
---
kernel/auditsc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 8cbddff..bac40d0 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -741,6 +741,7 @@ void audit_filter_inodes(struct task_struct *tsk, struct audit_context *ctx)
rcu_read_unlock();
}
+#ifdef CONFIG_AUDIT_TREE
static void audit_set_auditable(struct audit_context *ctx)
{
if (!ctx->prio) {
@@ -748,6 +749,7 @@ static void audit_set_auditable(struct audit_context *ctx)
ctx->current_state = AUDIT_RECORD_CONTEXT;
}
}
+#endif
static inline struct audit_context *audit_get_context(struct task_struct *tsk,
int return_valid,
--
1.5.6.3
next prev parent reply other threads:[~2009-03-18 22:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 21:49 [PATCH 1/3] Restrict definition of a variable in kernel/sysctl.c Dmitri Vorobiev
2009-03-18 21:49 ` [PATCH 2/3] Restrict definition of a label in kernel/module.c Dmitri Vorobiev
2009-03-18 21:49 ` Dmitri Vorobiev [this message]
2009-03-30 21:32 ` [PATCH 3/3] Restrict definition of a static function in kernel/auditsc.c Andrew Morton
2009-03-19 7:25 ` [PATCH 1/3] Restrict definition of a variable in kernel/sysctl.c Ingo Molnar
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=1237412967-20754-3-git-send-email-dmitri.vorobiev@movial.com \
--to=dmitri.vorobiev@movial.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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®