aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Bolle <pebolle@tiscali.nl>2013-01-24 21:53:17 +0100
committerSimon Shields <keepcalm444@gmail.com>2016-12-13 00:14:52 +1100
commit699bf014212c71ebdb99850682947e8ad19a7499 (patch)
tree30a944d9512429a06e4b6207706c55a1e93e08c9
parentab5cf14fb4432d2550896d37e77aa88c335ce9b8 (diff)
downloadkernel_samsung_smdk4412-699bf014212c71ebdb99850682947e8ad19a7499.zip
kernel_samsung_smdk4412-699bf014212c71ebdb99850682947e8ad19a7499.tar.gz
kernel_samsung_smdk4412-699bf014212c71ebdb99850682947e8ad19a7499.tar.bz2
BACKPORT: 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(-) Change-Id: I4a4e78fd92dccffe5fc7c3a2617ef7d4cf59f738
-rw-r--r--include/linux/lockdep.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index ef820a3..ee4410a 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -390,7 +390,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)
#endif /* !LOCKDEP */