diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-07-15 05:27:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-07-25 09:39:25 -0400 |
commit | 68037aa78208f34bda4e5cd76c357f718b838cbb (patch) | |
tree | c5fb04b2deb688ef1f9520c868fe8e1798b58f92 /kernel | |
parent | 6ffddfb9e1de21c3d0c0cfa4fe4a20dd3291a812 (diff) |
locking/lockdep: Hide unused 'class' variable
The usage is now hidden in an #ifdef, so we need to move
the variable itself in there as well to avoid this warning:
kernel/locking/lockdep_proc.c:203:21: error: unused variable 'class' [-Werror,-Wunused-variable]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Qian Cai <cai@lca.pw>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <longman@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Yuyang Du <duyuyang@gmail.com>
Cc: frederic@kernel.org
Fixes: 68d41d8c94a3 ("locking/lockdep: Fix lock used or unused stats error")
Link: https://lkml.kernel.org/r/20190715092809.736834-1-arnd@arndb.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/locking/lockdep_proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/locking/lockdep_proc.c b/kernel/locking/lockdep_proc.c index 65b6a1600c8f..bda006f8a88b 100644 --- a/kernel/locking/lockdep_proc.c +++ b/kernel/locking/lockdep_proc.c | |||
@@ -200,7 +200,6 @@ static void lockdep_stats_debug_show(struct seq_file *m) | |||
200 | 200 | ||
201 | static int lockdep_stats_show(struct seq_file *m, void *v) | 201 | static int lockdep_stats_show(struct seq_file *m, void *v) |
202 | { | 202 | { |
203 | struct lock_class *class; | ||
204 | unsigned long nr_unused = 0, nr_uncategorized = 0, | 203 | unsigned long nr_unused = 0, nr_uncategorized = 0, |
205 | nr_irq_safe = 0, nr_irq_unsafe = 0, | 204 | nr_irq_safe = 0, nr_irq_unsafe = 0, |
206 | nr_softirq_safe = 0, nr_softirq_unsafe = 0, | 205 | nr_softirq_safe = 0, nr_softirq_unsafe = 0, |
@@ -211,6 +210,8 @@ static int lockdep_stats_show(struct seq_file *m, void *v) | |||
211 | sum_forward_deps = 0; | 210 | sum_forward_deps = 0; |
212 | 211 | ||
213 | #ifdef CONFIG_PROVE_LOCKING | 212 | #ifdef CONFIG_PROVE_LOCKING |
213 | struct lock_class *class; | ||
214 | |||
214 | list_for_each_entry(class, &all_lock_classes, lock_entry) { | 215 | list_for_each_entry(class, &all_lock_classes, lock_entry) { |
215 | 216 | ||
216 | if (class->usage_mask == 0) | 217 | if (class->usage_mask == 0) |