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: 102807 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp277119lbl; Thu, 11 Feb 2016 07:44:08 -0800 (PST) X-Received: by 10.67.14.234 with SMTP id fj10mr67078996pad.149.1455205440387; Thu, 11 Feb 2016 07:44:00 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c77si13235801pfj.246.2016.02.11.07.44.00; Thu, 11 Feb 2016 07:44:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-serial-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-serial-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-serial-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751215AbcBKPn7 (ORCPT + 1 other); Thu, 11 Feb 2016 10:43:59 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:61644 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750866AbcBKPn6 (ORCPT ); Thu, 11 Feb 2016 10:43:58 -0500 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 Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Paul Gortmaker , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Matthias Brugger , Sascha Hauer , Eddie Huang , linux-mediatek@lists.infradead.org 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= Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)