From: Luis Henriques <henrix@sapo.pt>
To: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <pzijlstr@redhat.com>,
Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Conditional compilation updates in kernel/lockdep.c
Date: Sun, 14 Dec 2008 20:52:18 +0000 [thread overview]
Message-ID: <20081214205218.GA10877@hades.domain.com> (raw)
This patch removes the following warning:
kernel/lockdep.c:580: warning: ‘print_lock_dependencies’ defined but not used
Now functions print_lock_dependencies and print_lock_class_header are now
compiled only if both CONFIG_TRACE_IRQFLAGS and CONFIG_PROVE_LOCKING
are defined; function lockdep_dependency_visit and variable
lockdep_dependency_gen_id are compiled only if CONFIG_PROVE_LOCKING
is defined
Signed-off-by: Luis Henriques <henrix@sapo.pt>
---
kernel/lockdep.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 46a4041..f2eebc7 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -381,6 +381,7 @@ unsigned int nr_process_chains;
unsigned int max_lockdep_depth;
unsigned int max_recursion_depth;
+#ifdef CONFIG_PROVE_LOCKING
static unsigned int lockdep_dependency_gen_id;
static bool lockdep_dependency_visit(struct lock_class *source,
@@ -393,6 +394,7 @@ static bool lockdep_dependency_visit(struct lock_class *source,
source->dep_gen_id = lockdep_dependency_gen_id;
return false;
}
+#endif
#ifdef CONFIG_DEBUG_LOCKDEP
/*
@@ -549,6 +551,8 @@ static void lockdep_print_held_locks(struct task_struct *curr)
}
}
+#if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_PROVE_LOCKING)
+
static void print_lock_class_header(struct lock_class *class, int depth)
{
int bit;
@@ -599,6 +603,7 @@ static void print_lock_dependencies(struct lock_class *class, int depth)
printk("\n");
}
}
+#endif
static void print_kernel_version(void)
{
--
Luis Henriques
next reply other threads:[~2008-12-14 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-14 20:52 Luis Henriques [this message]
2008-12-16 21:03 ` 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=20081214205218.GA10877@hades.domain.com \
--to=henrix@sapo.pt \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pzijlstr@redhat.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
all inboxes | Powered by JetHome®