Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11164025ybi; Thu, 25 Jul 2019 11:05:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6Q1VuDTU74WlH0RXlPgZ/KwhcUy1TsdTGOtENqGwDiBX6YpbjsR1eCEFJjKHGb60pB5UA X-Received: by 2002:a62:1c93:: with SMTP id c141mr18472089pfc.9.1564077955526; Thu, 25 Jul 2019 11:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564077955; cv=none; d=google.com; s=arc-20160816; b=nS24vqJiblF6r7Yzv4ZMZBIS6rhCzxh2NdYx3q7SzOj6KDqPtXBEm3RvAALSN6lJtn iH1Hup3hZqJGihg9k5mN31zwKq43d719eSn8xBlwkX53UXkCXgLW+YuZA+BhoT48B5vn N8uc8u8RtDMQC2mpRQcGr0pwS44VIydAFJqDVjXzgoof6KGNPDGVjgyaaszrBxzWurwU 2I8Ujs9nRpMl91yNurxKDFvl4p7q7La9/UqZaH/Rt+7IxaceikQsyhRatnydltb2h2eX 8AtE62twbFyNCBoX3NnqaB5NWylEX/Iw4O1O1zBYI6nMrnvid10sbL729ddZ2sxlLAgD +OxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=A2BsfU+o5G861v52udO74SU0jEv17wo3QrmMOENtt5c=; b=eFY5GZ/WQRGOFFKj9x+0pKUkg6PH+9LF5bt6gZVZol2BAY+r2wLep5ulsCA3PiuIMg wQOw+KFCv21G3Nn3eVWiXo23L2l56DKKHKIKQcVqlBMujXT8/A4y18wZ1ATSjdpeqp5v RxBq7cxXjYL+77bOLFByKUHf2uvt5lyyaGOqxmjgZ6dQT64WYAkkQcdhI3e9ev35VsCY GyTVx8y66VugtQGaUcROzbzgMwQQNKCN4TCeIeQfUkVJ/JRD3LfMGqR4iacWAJi9aZWh +UDrZQLj3E9pi8wxozrlbZH00HjA462sGZnfvYuZAJcUhekbMLgNXgH8KQ+oxhJDAHNj Linw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019071901 header.b=zQpxCGRU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y20si16332087plp.335.2019.07.25.11.05.40; Thu, 25 Jul 2019 11:05:55 -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=@zytor.com header.s=2019071901 header.b=zQpxCGRU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389117AbfGYQEJ (ORCPT + 99 others); Thu, 25 Jul 2019 12:04:09 -0400 Received: from terminus.zytor.com ([198.137.202.136]:48051 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388481AbfGYQEJ (ORCPT ); Thu, 25 Jul 2019 12:04:09 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x6PG3RIM1071304 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 25 Jul 2019 09:03:27 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x6PG3RIM1071304 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019071901; t=1564070608; bh=A2BsfU+o5G861v52udO74SU0jEv17wo3QrmMOENtt5c=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=zQpxCGRUVOg8hAlv+h5QNII9ja+fUS1rUoHFeUc7ceQRGtK/nTT6XEIJ+CsFroIyj yF0OrcsxXGRGRzdKBisbEPLqjTnP+7U+SjFXMEsph/IWrxmB0ZeWqbfgzv+eHI19pC OH/tsnhEwz+Z+T7WToymS7vxn9STHQuEJP7myscbVei0t8rOeK7Q6g6i+hMn5dKjEE pSkt/1UhzXJkP4Yx75V8SUKi4hvN28kJhLz/WpMosyQawqIiWjzZjhu/1uj2vGFLcx 1lUgN+cgcCLuHI7GKLmA26i4f9Tlhjb9urkLnS1F1u7FnQmHiOq0vtNRSRJslJGnPC GtUqgI1JVXn2Q== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x6PG3QZP1071300; Thu, 25 Jul 2019 09:03:26 -0700 Date: Thu, 25 Jul 2019 09:03:26 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Arnd Bergmann Message-ID: Cc: cai@lca.pw, akpm@linux-foundation.org, will@kernel.org, tglx@linutronix.de, mingo@kernel.org, paulmck@linux.vnet.ibm.com, bvanassche@acm.org, arnd@arndb.de, linux-kernel@vger.kernel.org, peterz@infradead.org, will.deacon@arm.com, torvalds@linux-foundation.org, hpa@zytor.com, longman@redhat.com, duyuyang@gmail.com Reply-To: will@kernel.org, paulmck@linux.vnet.ibm.com, mingo@kernel.org, tglx@linutronix.de, akpm@linux-foundation.org, cai@lca.pw, hpa@zytor.com, torvalds@linux-foundation.org, duyuyang@gmail.com, longman@redhat.com, arnd@arndb.de, bvanassche@acm.org, will.deacon@arm.com, peterz@infradead.org, linux-kernel@vger.kernel.org In-Reply-To: <20190715092809.736834-1-arnd@arndb.de> References: <20190715092809.736834-1-arnd@arndb.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/lockdep: Hide unused 'class' variable Git-Commit-ID: 68037aa78208f34bda4e5cd76c357f718b838cbb X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=1.8 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, FREEMAIL_FORGED_REPLYTO autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 68037aa78208f34bda4e5cd76c357f718b838cbb Gitweb: https://git.kernel.org/tip/68037aa78208f34bda4e5cd76c357f718b838cbb Author: Arnd Bergmann AuthorDate: Mon, 15 Jul 2019 11:27:49 +0200 Committer: Ingo Molnar CommitDate: Thu, 25 Jul 2019 15:39:25 +0200 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] 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 --- 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)