History

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]

Arnd Bergmann committed 7 years ago

Commit 68037aa1 parent 6ffddfb1 file · +2 −1Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/locking/lockdep_proc.c+2−1
@@ -200,7 +200,6 @@ static void lockdep_stats_debug_show(struct seq_file *m) · 199 unmodified lines
200200
201201 static int lockdep_stats_show(struct seq_file *m, void *v)
202202 {
203− struct lock_class *class;
204203 unsigned long nr_unused = 0, nr_uncategorized = 0,
205204 nr_irq_safe = 0, nr_irq_unsafe = 0,
206205 nr_softirq_safe = 0, nr_softirq_unsafe = 0,
@@ -211,6 +210,8 @@ static int lockdep_stats_show(struct seq_file *m, void *v) · 4 unmodified lines
211210 sum_forward_deps = 0;
212211
213212 #ifdef CONFIG_PROVE_LOCKING
213+ struct lock_class *class;
214+
214215 list_for_each_entry(class, &all_lock_classes, lock_entry) {
215216
216217 if (class->usage_mask == 0)