From patchwork Tue Dec 10 20:39:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11283243 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A37EE138C for ; Tue, 10 Dec 2019 20:40:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 861ED20836 for ; Tue, 10 Dec 2019 20:40:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726366AbfLJUkK (ORCPT ); Tue, 10 Dec 2019 15:40:10 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:50263 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbfLJUkK (ORCPT ); Tue, 10 Dec 2019 15:40:10 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1M8yoa-1ic30Q0886-0067ql; Tue, 10 Dec 2019 21:39:28 +0100 From: Arnd Bergmann To: Tony Luck , Borislav Petkov , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Srinivas Pandruvada Cc: Arnd Bergmann , "H. Peter Anvin" , bberg@redhat.com, ckellner@redhat.com, hdegoede@redhat.com, linux-edac , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: [PATCH] x86/mce/therm_throt: mark throttle_active_work as __maybe_unused Date: Tue, 10 Dec 2019 21:39:13 +0100 Message-Id: <20191210203925.3119091-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:VvX2CPJbY4hvt8Tzl0Tk/uqCvbS1Yvswk4+Cz85uUFkxV5T1BHM ptYXLp9GzAL5B48jbB/OZQjmM4pF6t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kMJIYsQvAkxVE INDcHpuv/j+xlFhTXH5A== Sender: linux-edac-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org throttle_active_work() is only called if CONFIG_SYSFS is set, otherwise we get a harmless warning: arch/x86/kernel/cpu/mce/therm_throt.c:238:13: error: 'throttle_active_work' defined but not used [-Werror=unused-function] Mark the function as __maybe_unused to avoid the warning. Fixes: f6656208f04e ("x86/mce/therm_throt: Optimize notifications of thermal throttle") Signed-off-by: Arnd Bergmann Reviewed-by: Srinivas Pandruvada --- arch/x86/kernel/cpu/mce/therm_throt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mce/therm_throt.c b/arch/x86/kernel/cpu/mce/therm_throt.c index b38010b541d6..8963493a1e9e 100644 --- a/arch/x86/kernel/cpu/mce/therm_throt.c +++ b/arch/x86/kernel/cpu/mce/therm_throt.c @@ -235,7 +235,7 @@ static void get_therm_status(int level, bool *proc_hot, u8 *temp) *temp = (msr_val >> 16) & 0x7F; } -static void throttle_active_work(struct work_struct *work) +static void __maybe_unused throttle_active_work(struct work_struct *work) { struct _thermal_state *state = container_of(to_delayed_work(work), struct _thermal_state, therm_work);