[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-61b48fd031db92de6fe74ebba4bc3799bd55c3fa@git.kernel.org>
Date: Fri, 25 Jan 2013 02:40:15 -0800
From: tip-bot for Paul Bolle <pebolle@...cali.nl>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
peterz@...radead.org, bfields@...hat.com, pebolle@...cali.nl,
skinsbursky@...allels.com, tglx@...utronix.de
Subject: [tip:core/locking] lockdep: Silence warning if CONFIG_LOCKDEP isn
't set
Commit-ID: 61b48fd031db92de6fe74ebba4bc3799bd55c3fa
Gitweb: http://git.kernel.org/tip/61b48fd031db92de6fe74ebba4bc3799bd55c3fa
Author: Paul Bolle <pebolle@...cali.nl>
AuthorDate: Thu, 24 Jan 2013 21:53:17 +0100
Committer: Ingo Molnar <mingo@...nel.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@...cali.nl>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stanislav Kinsbursky <skinsbursky@...allels.com>
Cc: J. Bruce Fields <bfields@...hat.com>
Link: http://lkml.kernel.org/r/1359060797.1325.33.camel@x61.thuisdomein
Signed-off-by: Ingo Molnar <mingo@...nel.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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists