From patchwork Thu Feb 11 15:41:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8281681 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D863DBEEE5 for ; Thu, 11 Feb 2016 15:44:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3D9F20398 for ; Thu, 11 Feb 2016 15:43:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EC1D20306 for ; Thu, 11 Feb 2016 15:43:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aTtPS-0003YS-G9; Thu, 11 Feb 2016 15:43:58 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aTtPP-0003Im-Mt; Thu, 11 Feb 2016 15:43:56 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0MZUYX-1aiWX813gT-00LGy7; Thu, 11 Feb 2016 16:43:07 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Subject: [PATCH v2 3/6] serial: 8250/mediatek: mark PM functions as __maybe_unused Date: Thu, 11 Feb 2016 16:41:29 +0100 Message-Id: <1455205297-1021302-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1455205297-1021302-1-git-send-email-arnd@arndb.de> References: <1455205297-1021302-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:Uux6EYeZbOAJIu02O2PdNWktmCYNFsr8C6GcTxe0+l1w13mFDet 4evJ5zbbQISpjTrQCG6dBVDNNLWrAgoMycSyfhLlKFMJG+BP33dEY4klvJxbws6Pfnspx1s FBywA2qG/IR1u/VrWe1IRhPc+uvllhHMmgIVpaxnN04NS74iOcKhHvCkI3ZU9WyzOdV7N95 ghf+SGg6laWordHT/djlg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Oo0nidqwPZU=:RsGoEmbzh+3CM/ZJITMqK7 cTuCgAqnutl3Jp110sg/flKfZ210Xkhlr2DHjZpPkgyeC4rebAucq41AwXZRaWxFXOzLiOzQu 7UQ8WIO5o12+lTndwGNJUcof0efLRxN2uD2iqe3XYG2vfQLNMMydQqvbA1X2MswBPOxSMCS60 MLoWDRO9JmSHmMbp/tSTgxNyMtCBTSoFZXCJt3T524GaH+qGR2bnfeGI/GSuRqKCdxth4VI/U 796PXxNfah3azU0C1SMv9jH09Gr32VK0GzWkb0eiexiFXnO3Av9zzd5q0paUKewfamChCEOOV t0wpH60QsTn2HfTRoRJu1px+zWLpDbYTR+19zlIKZM5p7Kqixv2Xw5+dm/iu924LSKG/+uPH2 NzoJDaLI/R8uqKYAZnCMavC8FNibBVzsbQPcMzJb3g3RL5TxhaBYV7zelNUODjfKEIVqMFeIN XPZ6mfQEOxt4ozKG73GaqTB+TwC48A4herKS8ktWdvtiKeZAkEGN8/dgXz1VSubeqW4wliJCm MZAxd/uoQQ5F0OC6rXXaNXF6HPbos+nrE20vz5dpFv13f6cBB6SwBByNdbDeVaanIZ0syj2Pw vetl/3NhHJ5G3IQJ0SVxryTYDhn0Ieivyss4Hf7V6/MTOS26YVAMfiHU0V3R1BFHAQRKeCSuf /Ws0gp27yS3DK3ZlYs0ovR8dlm1OtJ4r/YxpbNE+xmz+c3n0551wSq5w49Ao5pG6S8z4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160211_074356_111400_66BEF731 X-CRM114-Status: GOOD ( 12.44 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Sascha Hauer , linux-kernel@vger.kernel.org, Paul Gortmaker , linux-mediatek@lists.infradead.org, linux-serial@vger.kernel.org, Jiri Slaby , Matthias Brugger , Eddie Huang , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The mtk8250_runtime_suspend function is not used when runtime PM is disabled, so we get a warning about an unused function: drivers/tty/serial/8250/8250_mtk.c:119:12: error: 'mtk8250_runtime_suspend' defined but not used [-Werror=unused-function] static int mtk8250_runtime_suspend(struct device *dev) This marks all the PM functions as __maybe_unused to avoid the warning, and removes the #ifdef around the PM_SLEEP functions for consistency. Signed-off-by: Arnd Bergmann Acked-by: Matthias Brugger --- drivers/tty/serial/8250/8250_mtk.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index 78883ca64ddd..6ecc6e3e82dc 100644 --- a/drivers/tty/serial/8250/8250_mtk.c +++ b/drivers/tty/serial/8250/8250_mtk.c @@ -116,7 +116,7 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, tty_termios_encode_baud_rate(termios, baud, baud); } -static int mtk8250_runtime_suspend(struct device *dev) +static int __maybe_unused mtk8250_runtime_suspend(struct device *dev) { struct mtk8250_data *data = dev_get_drvdata(dev); @@ -126,7 +126,7 @@ static int mtk8250_runtime_suspend(struct device *dev) return 0; } -static int mtk8250_runtime_resume(struct device *dev) +static int __maybe_unused mtk8250_runtime_resume(struct device *dev) { struct mtk8250_data *data = dev_get_drvdata(dev); int err; @@ -262,8 +262,7 @@ static int mtk8250_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int mtk8250_suspend(struct device *dev) +static int __maybe_unused mtk8250_suspend(struct device *dev) { struct mtk8250_data *data = dev_get_drvdata(dev); @@ -272,7 +271,7 @@ static int mtk8250_suspend(struct device *dev) return 0; } -static int mtk8250_resume(struct device *dev) +static int __maybe_unused mtk8250_resume(struct device *dev) { struct mtk8250_data *data = dev_get_drvdata(dev); @@ -280,7 +279,6 @@ static int mtk8250_resume(struct device *dev) return 0; } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops mtk8250_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(mtk8250_suspend, mtk8250_resume)