Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3802667ybi; Mon, 29 Jul 2019 12:56:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwod8H3/eb/nfSKTnSMQ1kUikncXo4wK6DIEDT1DzhRLifRtdeF11U2G1W93K1nfn8lLUhP X-Received: by 2002:a62:58c4:: with SMTP id m187mr37914123pfb.147.1564430189056; Mon, 29 Jul 2019 12:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430189; cv=none; d=google.com; s=arc-20160816; b=Zggt6EoIg9IZXDeQZ3CNlCQRkr3AsctVsSZKcW2IyTxT/1IS3ZS+ZKCa4kB0VldURz gAxefqnjphaW6gZTbNYMk/jqwIOj2SxvkkIm0uS51l/7tBlbBZaWd/6l5DbMAGWHrfSH r4oVLKtjsPy9DS/CORtto3NequpJJ3iIqzUmU0eF27JBQFGcRs3/dDo94eAvGMla9TcJ z2xemf3MqGozY62F/RuZO/J7Z/Oi6U28ZRDI/9tBC6/sjupZrKpAjdphSTzaea2OzcFu z2gjRyV9Uh7Vz7wQzghaVhMqcfGvP/KwvZugSYYENMzdwVEFHKHWVMFEk7eBTLwGPEku 8LLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VOEPuzLEIUNsJJPD9d8+2WBGAcF4aUvRbjOaQgTMdWI=; b=dh/q6qp0yX5M+KNVyysgFtY5x0QY1R4+ZsHeKL7BBW5dwk9sxjFCicaOaJG6EcPZ7C rjSg2IMxdhNZElqc+B0FIPnXEERJpGKSxT76B6hHFB/yNZYznpkziOq15Jj/SlsZ4Pj3 gqQ93jBL6MuuGkPxij5M9tOQJ1VTB2ocZbZ9ztmCHxNhCV4Q2DxXTlR1KlS1f0vXUtNX 5n7dfxZoaDN3SA3CQi8qDyBIgr23SAmDs4qQnErUjmTDfQUo+uq9KJE0HEudbar0t6Ip 3e1pBrupAzZKSdZTanFm2kVRV9JYkstqGpyI7JyF+sbpz0AVH/7JumS0j9cIYG96D5pN Y67Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DVaR1P0C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si11432695pgl.536.2019.07.29.12.56.14; Mon, 29 Jul 2019 12:56:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DVaR1P0C; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390946AbfG2Txy (ORCPT + 99 others); Mon, 29 Jul 2019 15:53:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:45690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403992AbfG2TxY (ORCPT ); Mon, 29 Jul 2019 15:53:24 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8B5F9217D4; Mon, 29 Jul 2019 19:53:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564430003; bh=gVXMSPxsMoaj7O3BI7h7uWTt29Ml/3dA1cUgjnpIRyI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DVaR1P0CZTUCDuLC7viAFHgSwWXP+VOF1xeDToHhbGGRvV78FROUpj9mdugAwt9ds NQ3A8ASBj+s/Iypbbm/JNRvhFY64X0A/f8IuGfbB8rnvD01e4uQZRAWJyrD967GCTF hvMNq0Fb4XlOg5z6s2Sp15snLd8NcRI+6WPwtGZI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , "Peter Zijlstra (Intel)" , Andrew Morton , Bart Van Assche , Linus Torvalds , "Paul E. McKenney" , Qian Cai , Thomas Gleixner , Waiman Long , Will Deacon , Will Deacon , Yuyang Du , frederic@kernel.org, Ingo Molnar , Sasha Levin Subject: [PATCH 5.2 166/215] locking/lockdep: Hide unused class variable Date: Mon, 29 Jul 2019 21:22:42 +0200 Message-Id: <20190729190808.592215578@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 68037aa78208f34bda4e5cd76c357f718b838cbb ] 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 Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Bart Van Assche Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Qian Cai Cc: Thomas Gleixner Cc: Waiman Long Cc: Will Deacon Cc: Will Deacon Cc: Yuyang Du 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 Signed-off-by: Sasha Levin --- 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.1