Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3815102ybi; Mon, 29 Jul 2019 13:09:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxff7agLdv9LYakaAQlZYYmzSgIggLFS+Yr+ZKYtBTC54H+jxXIiVpL2jv3p4rzJg3FJ8N3 X-Received: by 2002:a17:902:bc83:: with SMTP id bb3mr114485670plb.56.1564430985771; Mon, 29 Jul 2019 13:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564430985; cv=none; d=google.com; s=arc-20160816; b=XeRDhy0JsU1/Qodq6LjMX6qFSgW9uhZFnDlomWm2xuCFeIM2DCA7/4tiE3A/ZIoJPt ZG1bFOeFwS1h3Pcf4XQirnfee3YlpP10Gb+rW/Mg1nWPJS93KERF2tPw3gqDMxRQtZaj 7lgR0PWLiu9kLboPFnO1ld2Or3ePlEJ0/A6Yf60aZDGWDhMkXVlaKf0otfvVBSJXQrWj gTqbsIdRuwXO5Xg7O5wUA5or6i3bHFwlVzebzW8vzSC64znUgktSc0SOd591jy/fD0h2 L5v9VAe7NaEHSfFXWNNPxd0Ol1vCIRRHTc9FFWeaRwsCA/uS/uCpab6NLk+X0GhAxZRc YBGw== 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=mJqtOzos2J+QEGfdmozN3BnQCHcUiw62rNpke3EQaKM=; b=rX6X2jQQTZIQe1XHrJDDCc+YDD3m64TEfCYyEmrh3vAegWwu0Cjdx1HyRBoYJMIABx KzKRt6fQEfbZvQbL7z/LrzZYlN7coVUXLqWiQvOTXRaJ65tIO6xyGBSSQDHmoK3VxDf/ 0mL7Y7Ed0NVY3yoy/cpt+3XSoKKaHP97tyH7SKv8GWBsNfKiF9w2m3/Us+zPFLFLLYVQ 06zVoWrumPAESDkRS8w719q4m3sk7qan5MWmeF+zeUuqayPGO3evI2hfmOjpSujKZ6CI eR0oLBJ4PFt8SP5/KxAtEaXnRstVg/pUYOfy3tffdBucVXj6kvX4AoRtxFwlzJM52++h uO4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JbPLPAGI; 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 h11si54825922pju.90.2019.07.29.13.09.30; Mon, 29 Jul 2019 13:09:45 -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=JbPLPAGI; 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 S2388805AbfG2Th4 (ORCPT + 99 others); Mon, 29 Jul 2019 15:37:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:52824 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388795AbfG2Thz (ORCPT ); Mon, 29 Jul 2019 15:37:55 -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 804DC206DD; Mon, 29 Jul 2019 19:37:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429074; bh=bmHI5YoGnZ4tyEW1swpCkzC8+CTt/8nwmGZt77rb7Ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JbPLPAGIfIWqb9ZgqGiwqvo9yrCoUijxoabO7n68WLZCQLVCNxN6065CVsK95rSZv mhTrE3P/HgpFNA0m2hOn0g6egp4+e0EJ9N1UEkiPJaUPCmpCi+l5fek3BgBREXRxtQ wjZrG7cOkSCDyVcUo4FpdzZwJ2qb2yERPLhRsLJQ= 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.14 277/293] locking/lockdep: Hide unused class variable Date: Mon, 29 Jul 2019 21:22:48 +0200 Message-Id: <20190729190845.513080090@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 71631bef0e84..8b2ef15e3552 100644 --- a/kernel/locking/lockdep_proc.c +++ b/kernel/locking/lockdep_proc.c @@ -224,7 +224,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, @@ -235,6 +234,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