Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4013605ybi; Mon, 15 Jul 2019 02:30:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZYE5BjIh/hcXqGP+O5dZ99buo6qOM7sZgCgXB66/IpUk8FHl1zlFGHJWu0aD6Kwnb//p7 X-Received: by 2002:a65:6495:: with SMTP id e21mr26188753pgv.359.1563183059577; Mon, 15 Jul 2019 02:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563183059; cv=none; d=google.com; s=arc-20160816; b=bc7rMQIdYQl/XD2LAZjSHvejKbSL8e2A4d6IPpllTBKRtBwlN21Rd2G+ulGMRNOxgZ 4mtGsGUf9oCyIYK6HZBOV3X6+eFqRyDSpUBu1NSSyNSlnfh/2C4Bcx2zbANtBOAJPwqs a1gMCtonKv4Xai33s4voF30jikv+3NKKsRsxKLPiCckzfK6Hs6F6JoTLUxvff8oKMo0d uuWcJn2gFHqiTxYg421LNqYXRkaFqATMtpzx5jiwfuvUEGXGh8MT+6a/bcnMc3iWmLBM 1kyX/J8D+IEb/mPa2ANgBUiGjtgTqNK/MJIIsBALTtR5f7BQQAlXBbOhvZ9a5aDJVYoZ dOLA== 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 :message-id:date:subject:cc:to:from; bh=EPsZfOMAVojTvzfYfBPDtbHcAnYO9KeLpDLIOudbmig=; b=XiYjR12GhiVmFudPNhkSxWfkTMAe4R/j7TlmDLnurzEFQSuzVs+qiVo+7zj/yCdzEC XOO4b6Mwe70pnV+0nGpfy+x53nJoxcp6vURQcTpiGSoQUQuGWJW71MXSRRgUSraKx9UU lRX9ODg40lNewtuVkzOEhscTJS7OJVM/FcMcP9QEioU+80YbkFEHrz4lpiHGUNUL6nOT H/SeLUh4JgcfozzTu/pn+PRXLzRGIeuoTeR/oHIMKC6iiuQs11xlybBT+cfrv0R5iocu XEmx5QtLwe9bRz01C7qRL4JpudMBUCwIg3RRs2ABlY764sso7RMmYzkI2RZoCPCEGKoS l0cQ== ARC-Authentication-Results: i=1; mx.google.com; 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 v10si11796148pgb.148.2019.07.15.02.30.42; Mon, 15 Jul 2019 02:30:59 -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; 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 S1729643AbfGOJ2j (ORCPT + 99 others); Mon, 15 Jul 2019 05:28:39 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:34757 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729487AbfGOJ2j (ORCPT ); Mon, 15 Jul 2019 05:28:39 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1N1cvQ-1iSrg40HAu-011ysw; Mon, 15 Jul 2019 11:28:12 +0200 From: Arnd Bergmann To: Peter Zijlstra , Ingo Molnar , Will Deacon Cc: Arnd Bergmann , Qian Cai , Yuyang Du , Andrew Morton , Linus Torvalds , "Paul E. McKenney" , Thomas Gleixner , Will Deacon , frederic@kernel.org, Ingo Molnar , Bart Van Assche , Waiman Long , linux-kernel@vger.kernel.org Subject: [PATCH] locking/lockdep: hide unused 'class' variable Date: Mon, 15 Jul 2019 11:27:49 +0200 Message-Id: <20190715092809.736834-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 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Lgrbuw 4hNdeTB5XuALsY99JNANic4aANgvxlP2adxhrw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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