From patchwork Wed Feb 3 22:05:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102851 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp111226lbl; Wed, 3 Feb 2016 14:07:24 -0800 (PST) X-Received: by 10.98.64.27 with SMTP id n27mr6121627pfa.58.1454537244187; Wed, 03 Feb 2016 14:07:24 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mk9si11678398pab.101.2016.02.03.14.07.23; Wed, 03 Feb 2016 14:07:24 -0800 (PST) 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 S1756421AbcBCWHW (ORCPT + 30 others); Wed, 3 Feb 2016 17:07:22 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:51722 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756130AbcBCWHV (ORCPT ); Wed, 3 Feb 2016 17:07:21 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0LxpLQ-1ZxPZN48rU-015MsV; Wed, 03 Feb 2016 23:06:18 +0100 From: Arnd Bergmann To: Andrew Morton Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Mike Krinkin , Andrey Ryabinin , Ingo Molnar , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org Subject: [PATCH] kernel/locking/lockdep.c: mark chainhashentry as __maybe_unused Date: Wed, 3 Feb 2016 23:05:50 +0100 Message-Id: <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z4TTHZtpo= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly added chainhashentry() function is only use when CONFIG_PROVE_LOCKING is enabled, otherwise we get a warning about it. kernel/locking/lockdep.c:318:26: error: 'chainhashentry' defined but not used [-Werror=unused-function] We could add another #ifdef or add __maybe_unused to avoid the warning, this patch picks the second option. Signed-off-by: Arnd Bergmann Fixes: a33a23c7def8 ("kernel/locking/lockdep.c: make lockdep initialize itself on demand") --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 9269b1a74260..0d3c08d23946 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -315,7 +315,7 @@ static inline struct list_head *classhashentry(struct lockdep_subclass_key *key) static struct list_head __chainhash_table[CHAINHASH_SIZE]; -static struct list_head *chainhashentry(unsigned long chain) +static __maybe_unused struct list_head * chainhashentry(unsigned long chain) { if (unlikely(!lockdep_initialized)) lockdep_init();