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: 181168 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp6408038ile; Tue, 10 Dec 2019 12:40:12 -0800 (PST) X-Google-Smtp-Source: APXvYqxHkRaPPpdcqoguLnYTXr0tKeva/v3CJBsR1+ftZT3GfDQq1uXEyZkP3sSQI4cYgU5QvZbD X-Received: by 2002:a54:4482:: with SMTP id v2mr732016oiv.0.1576010412348; Tue, 10 Dec 2019 12:40:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576010412; cv=none; d=google.com; s=arc-20160816; b=U+6SrK2kKkgMbONHFb87uC4p7rRcN4ECC5Kku7yTzc99aRE3sNlsjcmppxkCHyIq5f Gcl/L2xruXNrfWKFf2pieWHgbPyNjRJFYMfVB9e87wgOnk5cl5+tbJNUbtl6z7QkiSmd p4vbYy/zgLzI++gis+elTiip1+zKKYQLvZLe1CF8SsOo1PDEcgR818v0CKN2OXpdZFbn a9diOUQ0gqmraNniJudp6RzRTaNqXiXnKLSl432pmF/m8LeW8Z6jc+OGxw+4+2X4JA4C xPD9sSPYCasILUFvmeDpOu35MhuY2bVG5bSN7JURU15fbu1uUAhLuxJyUNSevqsrjcHI gdrQ== 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=xkv2x+JsNwsQ4+mRAfidPT+pzCR3icBWcr1eT65LMoc=; b=wmQtMgdIFl8vBjFD4Ulits+I9xYPHIJy9k1UKCdI/2tAMiv61JBEKWj48R9KLqli6E RMpv2JxJTd3RSXjCFxZ3DOs0MMSQif9dKk0eWjOgq9WNz2mGf9wyjya3naNrPVXhP72t h7NUtx2WqsYEOeyLN0mDgGYSP9NI9a1cQXIa2BPUOW2jQO0umWkMaryIeA674EkrVwUD Q0rsVjJ9XYlxmMQcLAow3+IJrC9HW8ckhMEtrH7Dm3qCeN8c1v1AhSi44k/vGgO/FRM/ B3BtY/SjmJqBIgfMoi3sukYZo5nbNQHagwHh1v8Q9xVt2ybpWBJI8mL2bUze4vdVkxtA czUw== 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 d68si2639258oib.194.2019.12.10.12.40.11; Tue, 10 Dec 2019 12:40:12 -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 S1726925AbfLJUkK (ORCPT + 27 others); 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/OZQjmM4pF6tydVOA/8xT0ZDukdRzHPPhAhE/8G49HHJwjKRpYKMX tCfYneTIisbuZvIb/yLZTH7K0ULi4y0bmuVdO0aA+lGlzewu9wjKwOAcVZY8KnaDNhYLp/L GybRisYFrTyuTLMvySKug== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:clbJ3G5bkOQ=:Y0JgssQH5r4ZQOMKi778tQ m52mWP0VeKwN9oYY70RFsdcwX31HGcnBhTceSZwb48HFslraXHiGNPyfluReVKgEDM4iyZSTR tUGR3CIL80Ydb/CqDqNQkPq4UuN55oaNDWculfJzM2oOgeCh82xE1VM/9mrfSA0SJDW5rNGM5 0o0ZhTBVkc4Bt+m9EH9e5lhuJFfCpBZhRgwbOJBWbzLSp/+zVyPrD3Bec1tM1cvTIL/UTi5Hk Oe4FuRXtXbZMc3LsqlWIbE6kgx11/ycgJYzeighOGW21mTeBulm/brSqWuOuo/ExVHO/pY9xh GBnxzRk/7kYPlpLrJArHdt1QMqW8DkvgVqNebN7IqfTHJlxC1ij5RoZwF+xAAw0KwErhjT9Px OWsd8t2o+BXRjDmHLxcwqTkhD+RloVnKz4ojnIZpuHHl9h4lGOyuVVcFeDRcV/Q5NwBsQcHT9 zPHjk6+hYdS7sezquiAFNVB1hfLX2k2C9vBUJ3m9b02IjTiXlcqeuVukXQElCMJtg6vNxlLlx LZJTKsPeStIwZd8fdhGZxCGxGZaLiRGWVFnhP2s20c97kwQXa8M/rGQ0eB5rjpDhqpUshBdk2 CNHOJeu/KstDmVGtHBsCmDI4rVB0R1UXKqzRQT712Qzw/SiKXl0blYDpmHTBE3+oUJ5YMbLEF unSnu2UFkX4AGd8wwyJ3KZK1RvZ7amjf3D6PCi0M7GbdycETTMu4QfsC/gAO97qL5y251h79h B0WXEehB5uU3E5liM48pG83g2ixzPuQ3y7BDnExNJ17dANOC+ZMOLF+G+RDoyoGjK0oSkctcs qo8n3rktf+O7S9fm0wWT5qSJa8ljCZxj/qQoTVYAa8LKH22twZwMwyVS/50EkMJIYsQvAkxVE INDcHpuv/j+xlFhTXH5A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- arch/x86/kernel/cpu/mce/therm_throt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 Reviewed-by: Srinivas Pandruvada 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);