From patchwork Tue Jan 10 15:28:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9508023 X-Patchwork-Delegate: dvhart@infradead.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A7C19601EA for ; Tue, 10 Jan 2017 15:29:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AC732858A for ; Tue, 10 Jan 2017 15:29:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F7722859B; Tue, 10 Jan 2017 15:29:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41A262858A for ; Tue, 10 Jan 2017 15:29:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752556AbdAJP3f (ORCPT ); Tue, 10 Jan 2017 10:29:35 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:49459 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752075AbdAJP3d (ORCPT ); Tue, 10 Jan 2017 10:29:33 -0500 Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0MSao8-1bzMoS115o-00RcTp; Tue, 10 Jan 2017 16:29:00 +0100 From: Arnd Bergmann To: Darren Hart Cc: Arnd Bergmann , Benjamin Tissoires , Andy Shevchenko , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] platform/x86: shut up unused-function warning Date: Tue, 10 Jan 2017 16:28:47 +0100 Message-Id: <20170110152857.3140948-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:uQrFijwjpmj1fv2stq3S36OOT1VNixibCX0bGNcb2Bpdf63xgwo uMjOjZvcXNQgYlVXSTQOr+ufUmW5Fte22walOgvvyJ9IHQkBE8hKudtc0K+iW6VgdIHc/9V cuvKUUEC3LV1bsVJHpwek9Fh3C4/qXaoOYWdpaFmK9HJy+Efr1wHt8Wu1hQ1xRyaziKKQIX DeH53oRguDUxD9n6Z7baQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Buf/LpuQXWM=:d3rNAqE4oOg6xgTMSyn+ie VLQwFd5daFbHIOcpPRyYX1v5Kr7xzyCXrOfd0ib7l5pW2qHj1fXtzP0tk5c18YmV02gNMhajL 3qHzkVZYj2qPzHx4sU+Q3ixAjEDWvn5HPXKH18LeyY8rddBMn0f/CKeVijoYQxQeiSJsN3xjf TRZoU10D9MShMb06tfBrYcEfRzl7uq0FPthnTXh+YkEBagsiYT+jaZ4JDf3T0hFGsCfnBlgFm Ip5bJmnZ8p0JLGTXgopWje8pAvmZU3UE4bCZep5DI/NY2DIoW6imUUy0j9qORFjLCEZPZ9PwU bPRmLKzfasoW3VmRAb8N0neVjGGB5lH6kR08y8vZt3QxhdmF0fo11PvVvGb+qnEgw5OAjnJrU Go+rsbV8IlOFPxWyC5b0rszLR/YdMmbNYT2zTSVeCQ9cGj8v8NiUJ3cr7iJOGqiw0La0ODbk5 AaEUSB52BRRbYINQdyGmpD0VYTkZutzZPn2LLRuy8M0qjmGmfVe/FnAd7Y4iWqhSIP+oAiMRC cx/Bs0Y4i7CL66lw8aDP5btmBrsX1RC/uU8ZMlJ/qi6sRMstcF/AOavbKBgbDTnNwYTXmrenL b9XNS5yT+2Dn6AqdZn97gKPv/kblvfG8A/UUjmYqicTDC3V867oT+V4bgGjk9WKiFDU3GF69w 9lwjLnqI8Ll8MZZz43se+NLGHQxoYChlgaltpgY9LbgLYZAYAzvdpBknazstHPiUO1TU= Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The newly added driver guards its "resume" callback with an #ifdef CONFIG_PM that should be CONFIG_PM_SLEEP instead, leading to a warning in some configurations: drivers/platform/x86/surface3-wmi.c:248:12: error: 's3_wmi_resume' defined but not used [-Werror=unused-function] Using a __maybe_unused annotation without an #ifdef avoids the mistake more reliably. Fixes: 3dda3b3798f9 ("platform/x86: Add custom surface3 platform device for controlling LID") Signed-off-by: Arnd Bergmann Reviewed-by: Benjamin Tissoires --- drivers/platform/x86/surface3-wmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/platform/x86/surface3-wmi.c b/drivers/platform/x86/surface3-wmi.c index cbf4d83a7271..6ac1d1349d7e 100644 --- a/drivers/platform/x86/surface3-wmi.c +++ b/drivers/platform/x86/surface3-wmi.c @@ -244,13 +244,11 @@ static int s3_wmi_remove(struct platform_device *device) return 0; } -#ifdef CONFIG_PM -static int s3_wmi_resume(struct device *dev) +static int __maybe_unused s3_wmi_resume(struct device *dev) { s3_wmi_send_lid_state(); return 0; } -#endif static SIMPLE_DEV_PM_OPS(s3_wmi_pm, NULL, s3_wmi_resume); static struct platform_driver s3_wmi_driver = {