From: tip-bot for Paul Bolle <pebolle@tiscali.nl>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
peterz@infradead.org, bfields@redhat.com, pebolle@tiscali.nl,
skinsbursky@parallels.com, tglx@linutronix.de
Subject: [tip:core/locking] lockdep: Silence warning if CONFIG_LOCKDEP isn 't set
Date: Fri, 25 Jan 2013 02:40:15 -0800 [thread overview]
Message-ID: <tip-61b48fd031db92de6fe74ebba4bc3799bd55c3fa@git.kernel.org> (raw)
In-Reply-To: <1359060797.1325.33.camel@x61.thuisdomein>
Commit-ID: 61b48fd031db92de6fe74ebba4bc3799bd55c3fa
Gitweb: http://git.kernel.org/tip/61b48fd031db92de6fe74ebba4bc3799bd55c3fa
Author: Paul Bolle <pebolle@tiscali.nl>
AuthorDate: Thu, 24 Jan 2013 21:53:17 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 25 Jan 2013 08:43:57 +0100
lockdep: Silence warning if CONFIG_LOCKDEP isn't set
Since commit c9a4962881929df7f1ef6e63e1b9da304faca4dd ("nfsd:
make client_lock per net") compiling nfs4state.o without
CONFIG_LOCKDEP set, triggers this GCC warning:
fs/nfsd/nfs4state.c: In function ‘free_client’:
fs/nfsd/nfs4state.c:1051:19: warning: unused variable ‘nn’ [-Wunused-variable]
The cause of that warning is that lockdep_assert_held() compiles
away if CONFIG_LOCKDEP is not set. Silence this warning by using
the argument to lockdep_assert_held() as a nop if CONFIG_LOCKDEP
is not set.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: J. Bruce Fields <bfields@redhat.com>
Link: http://lkml.kernel.org/r/1359060797.1325.33.camel@x61.thuisdomein
Signed-off-by: Ingo Molnar <mingo@kernel.org>
--
include/linux/lockdep.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
include/linux/lockdep.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 2bca44b..f05631e 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -410,7 +410,7 @@ struct lock_class_key { };
#define lockdep_depth(tsk) (0)
-#define lockdep_assert_held(l) do { } while (0)
+#define lockdep_assert_held(l) do { (void)(l); } while (0)
#define lockdep_recursing(tsk) (0)
next prev parent reply other threads:[~2013-01-25 10:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 20:53 [PATCH] Silence warning if CONFIG_LOCKDEP isn't set Paul Bolle
2013-01-25 10:40 ` tip-bot for Paul Bolle [this message]
2013-02-22 12:24 ` [tip:core/locking] lockdep: Silence warning if CONFIG_LOCKDEP isn 't set tip-bot for Paul Bolle
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=tip-61b48fd031db92de6fe74ebba4bc3799bd55c3fa@git.kernel.org \
--to=pebolle@tiscali.nl \
--cc=bfields@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=skinsbursky@parallels.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).