[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHttsrb+vg-E2HpQDTKnf7Xkg03-wd2YEOAWaVCDzdeOASPcPQ@mail.gmail.com>
Date: Wed, 17 Jul 2019 13:32:58 +0800
From: Yuyang Du <duyuyang@...il.com>
To: Arnd Bergmann <arnd@...db.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Qian Cai <cai@....pw>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Will Deacon <will.deacon@....com>,
Frederic Weisbecker <frederic@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Bart Van Assche <bvanassche@....org>,
Waiman Long <longman@...hat.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] locking/lockdep: hide unused 'class' variable
Whoops..... Thanks.
On Mon, 15 Jul 2019 at 17:28, Arnd Bergmann <arnd@...db.de> wrote:
>
> 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]
>
> Fixes: 68d41d8c94a3 ("locking/lockdep: Fix lock used or unused stats error")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> kernel/locking/lockdep_proc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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)
>
> static int lockdep_stats_show(struct seq_file *m, void *v)
> {
> - struct lock_class *class;
> unsigned long nr_unused = 0, nr_uncategorized = 0,
> nr_irq_safe = 0, nr_irq_unsafe = 0,
> nr_softirq_safe = 0, nr_softirq_unsafe = 0,
> @@ -211,6 +210,8 @@ static int lockdep_stats_show(struct seq_file *m, void *v)
> sum_forward_deps = 0;
>
> #ifdef CONFIG_PROVE_LOCKING
> + struct lock_class *class;
> +
> list_for_each_entry(class, &all_lock_classes, lock_entry) {
>
> if (class->usage_mask == 0)
> --
> 2.20.0
>
Powered by blists - more mailing lists