Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1073301ybi; Fri, 2 Aug 2019 08:55:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzi/sx+hMDFaHTDkLfTpfpjO1/XYSLf2bamFcop0OzYXr1mPaAoD6Ifo93Dhd7wyl204NQW X-Received: by 2002:a17:90a:f491:: with SMTP id bx17mr5100378pjb.118.1564761320394; Fri, 02 Aug 2019 08:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564761320; cv=none; d=google.com; s=arc-20160816; b=fkJlCbSE3/avEdWJVm77GEjdmm2/zKu8AptcU7klTIl3wvSFYodCDaPPHW7B8EIyfC MxX180553weMwJoCzbIntlvrdoD/+wVzst+089G5aaBt5EVNOHy2KMaYMTzwvQON3NTs GQrNtbUfSL0sx9RzACR2b3nLmAlcN9vyKQMiBZ+dQd+gpn/2nsuAvcCVns0SdGdkCIlO ELbJZBUWlOaYJlW9VDLd+ZgRSoY4xNIg+yD3ZfJOJufj2LRATLUqOY2zDIeUSF0h5hgX fDkhbU+/dBaQqUmv7Cz9p5ehXqaoEHRl6EZwVUo2Ti2mvGewHf7lEf1tdlvI8i1ensdW bKMg== 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=zO7YGI5TEU9w0TrmLtSbSgcdPH/YtDcgjAybWUAc2xM=; b=krMkUUo8RgscB+qfycpxqBvkEy/Oeb4UG8eRdH3tECyeuzSE3S/gpnNOdmHJy8JN0O 0kWRGJSjFBJduzN7qdDzHGvRHUjf8nMMUtbQtp4IB/Q0n8GFJh+qZTSmAagFJv7BsEFe 10tCQD5vWdJOgdoKVQlsYvz9tDd8RmbmxEhhSvmhtvNmbaF6oqXZ6pb6r/oRT1xRZY1b TuTEhYoCPlOiwoJ8vUXPPy0GUF/aoTY8KT2SQLc5lBByoh6BnvOJp5uWO42+AKzCl7dB GPJgywitjAHOMe2HDbsleEPgJ+ocztNbtBTii3So69wwc+4h4GkodERlUzUNHsVS8lvz 7giQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LAox6Nw9; 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 68si33879429ple.89.2019.08.02.08.55.04; Fri, 02 Aug 2019 08:55:20 -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=LAox6Nw9; 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 S2391663AbfHBJf2 (ORCPT + 99 others); Fri, 2 Aug 2019 05:35:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:35922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391655AbfHBJfZ (ORCPT ); Fri, 2 Aug 2019 05:35:25 -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 6F9D4217D6; Fri, 2 Aug 2019 09:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738524; bh=aMw5OEOfuvqaK4/8eH+FqTlovkkEXzLycm8UxsZWlJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LAox6Nw9Kv3aI/nnsF9GYy9ZoRm3ae7HE7tuQSbxj8ElX+CmZ/zKoINOY+y1IAV5I YS4iGGVqlh9e+ohCXQ7kVkHZZaAJVWjPJtR2Trq+VdyHO1V0fpbSz8GPiZjJfm0YoV VEysy10x+M2n9CaPjqWHXjmyQyXip8+CoRmqm11w= 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.4 138/158] locking/lockdep: Hide unused class variable Date: Fri, 2 Aug 2019 11:29:19 +0200 Message-Id: <20190802092231.013094782@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092203.671944552@linuxfoundation.org> References: <20190802092203.671944552@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 9778b6701019..35b34eccdd10 100644 --- a/kernel/locking/lockdep_proc.c +++ b/kernel/locking/lockdep_proc.c @@ -217,7 +217,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, @@ -228,6 +227,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