Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1241735ybi; Fri, 2 Aug 2019 11:48:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbEt9wDgdBF3IYmhuUtd7huYYJ98YhTttT/v6o24YJZe6p6QqdNOyy8b+BGQ0Y3qJahgyo X-Received: by 2002:a63:e44b:: with SMTP id i11mr76913495pgk.297.1564771728235; Fri, 02 Aug 2019 11:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564771728; cv=none; d=google.com; s=arc-20160816; b=wh3ualkloPRCWP3XeH8Uyaija+5/nilC1/S8fOaRTiX1DscpyQGGPxdBQsOQXQFRoQ c5NqEmn9K/Xl9SRV53PA1/1Rb7uzCclXJBPxahDNjsEH9TKStIU4opx9J+wpoFwdoP3i ufNfND6BbjQ1xIKTpzGRRBX8vV/jeDRsifr3F9vGj+brDM1Ncxq+n7yGimZIV/dXIGDP GjrOS9Z52eHfft2oXCCeClQO5stRP9MwjQkQS+b1+FqQ6q2WmCr3eZ/3Ah2+nmAlLPGX SgWnm9juMR/2OW4eFqGqLL6cNsfTAk/v6ka86J48yXR0b1W31iGwnK+VofSDUxrf9gOz Sz0A== 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=E2KCYIvp21vlk+jD+R/+rRfOyxtCicxMB9d54EFLgcg=; b=n3x6ou3rcMIEavGRDXR7YnmbWLQ8cxfDIpsWMCtOdJSnpv+IKz9GFwgNWZMGt2W1eP mdP21D4aAW3dD4u1pqBB2LQwAIiE6iCYk9UeYKvAELH9g4rFJQg9fFwFPzGFTvRA8Yyu jjtIlCyLK6pmvnZ/LftnDzpyf32Vil0QFZeLISMDzmsiZpQbDcZQ4zwywC35+vfiPaGc wJ3XSAEZF1NwLsRWlpKDIFCsuIa1PCABPwJaw5qZfF7Wdjsl7v0G7kbFC7KAMHgo9qDq U9ZwVuL5+i3hvBfCTIoWzkbe79BwFqLv4/9P3ZL4xtwqUj3DOKUZ3/P3kQTaDdKY+LBZ Q3rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RDml87RE; 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 i186si40398721pge.9.2019.08.02.11.48.32; Fri, 02 Aug 2019 11:48:48 -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=RDml87RE; 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 S2406101AbfHBJwy (ORCPT + 99 others); Fri, 2 Aug 2019 05:52:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:58600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406076AbfHBJwr (ORCPT ); Fri, 2 Aug 2019 05:52:47 -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 E14B9206A2; Fri, 2 Aug 2019 09:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564739566; bh=f9UInQFVitNHxgoUSUC9mNopKJrzLQaGf2OF4u/rXVw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RDml87REe8YxqbzH10lVSwGUxSPyomw7s6MsW152gzMx2FVWVD27tzYa7OqIr61rg WcunTHBmSuktOqb8TOKpM0SOMUU8KNl1dJvhCJOol6eSsjZSi/AicFLi3bMu+86pVq zPwFaNDVLZeyEA7aJaR3HVMCIB6CxNERfBRdER+8= 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 4.9 201/223] locking/lockdep: Hide unused class variable Date: Fri, 2 Aug 2019 11:37:06 +0200 Message-Id: <20190802092250.139255675@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092238.692035242@linuxfoundation.org> References: <20190802092238.692035242@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 c482de6f5262..75d80809c48c 100644 --- a/kernel/locking/lockdep_proc.c +++ b/kernel/locking/lockdep_proc.c @@ -219,7 +219,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, @@ -230,6 +229,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