Commit-ID:  1431a5d2cfa18d7006d9b0e7ab4548d9bb19ce55
Gitweb:     https://git.kernel.org/tip/1431a5d2cfa18d7006d9b0e7ab4548d9bb19ce55
Author:     Bart Van Assche <bvanass...@acm.org>
AuthorDate: Thu, 6 Dec 2018 17:11:32 -0800
Committer:  Ingo Molnar <mi...@kernel.org>
CommitDate: Tue, 11 Dec 2018 14:54:51 +0100

locking/lockdep: Declare local symbols static

This patch avoids that sparse complains about a missing declaration for
the lock_classes array when building with CONFIG_DEBUG_LOCKDEP=n.

Signed-off-by: Bart Van Assche <bvanass...@acm.org>
Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org>
Cc: Johannes Berg <johan...@sipsolutions.net>
Cc: Linus Torvalds <torva...@linux-foundation.org>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Sasha Levin <sasha.le...@oracle.com>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: Waiman Long <long...@redhat.com>
Cc: johannes.b...@intel.com
Cc: t...@kernel.org
Link: https://lkml.kernel.org/r/20181207011148.251812-9-bvanass...@acm.org
Signed-off-by: Ingo Molnar <mi...@kernel.org>
---
 kernel/locking/lockdep.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 1efada2dd9dd..7434a00b2b2f 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -138,6 +138,9 @@ static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES];
  * get freed - this significantly simplifies the debugging code.
  */
 unsigned long nr_lock_classes;
+#ifndef CONFIG_DEBUG_LOCKDEP
+static
+#endif
 struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
 
 static inline struct lock_class *hlock_class(struct held_lock *hlock)

Reply via email to