From patchwork Tue Nov 8 14:50:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101550 Delivered-To: patch@linaro.org Received: by 10.182.113.165 with SMTP id iz5csp1738460obb; Tue, 8 Nov 2016 06:52:13 -0800 (PST) X-Received: by 10.98.14.82 with SMTP id w79mr23811387pfi.153.1478616733814; Tue, 08 Nov 2016 06:52:13 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u76si37245533pfg.225.2016.11.08.06.52.13; Tue, 08 Nov 2016 06:52:13 -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 S1752325AbcKHOwM (ORCPT + 2 others); Tue, 8 Nov 2016 09:52:12 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:61667 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbcKHOwL (ORCPT ); Tue, 8 Nov 2016 09:52:11 -0500 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0LvkMO-1ctbLx2r52-017UJg; Tue, 08 Nov 2016 15:52:01 +0100 From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , Jiri Slaby , Robert Jarzmik , Sergey Yanovich , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] serial: pxa2xx: mark PM functions as __maybe_unused Date: Tue, 8 Nov 2016 15:50:42 +0100 Message-Id: <20161108145130.3502815-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161108145130.3502815-1-arnd@arndb.de> References: <20161108145130.3502815-1-arnd@arndb.de> X-Provags-ID: V03:K0:QNMYvCPgb37DZBjbSpEW3fBIrRt4MFuPPxaLLnVxAcVhz3ofGOq rcu8dUanx9Ksqa2NrvFeCSO+Yz3AxPNXjfVFuYXYp8cSqRyxKfMjMpvHJ0TWG1Sn4xqSJqP /I241YDThOYAJNwvhBUBuOxxPZs7nqsCGW+qllJTrbi7kxbxa/f2x7fBe/uM/gCLofCRPco 5QoTCgUlsRqlmbjX8iAzw== X-UI-Out-Filterresults: notjunk:1; V01:K0:U/E+nskcjVc=:RAZzEpsTLVWrK2gX1Ymvnn NMRC3F7DLGvXVaoOzAWRogOA1mGX4zRQRIHmOqLkC+1NfF75FhbuZf9Tpa2ILJfQlui6jYao7 yKzwkzLhnPxU6v/BWvzsXa85vQWzqiseD6SZBYmaqyXm6c9YiCdMev5nR5LkzyxDd7yP46URL uyzgYhBVFDy29dymBk/lipVC2ZbFFehZNR2r5uqArVzd2Ih44JR2IrmjLh90XlGIrCAic0qfT 7UKXBNSCwfX++89UlVlh1SUmRhUPnZq7e7g4ll/ZUSjgNPoOUocQ6K6T3DkyCzAavjxDXxnWt +uHeoG4YiOy2gdniUR7Uil/kDSrhAjE//1mObTb5nzEo/+U2axPjmK81iwZ0uRTU9IxZoG23c WuQ2gVr/+JeoB7wesUEyIKP9BHYTClXx02ORzF/0v5fo92KWuYiGCQdjw32NZLR8tonpTx+6v sZy7GHq8bEkqzweqj6khwRD16RATT9ABERoDXjr6Ea0NApr8U2Bq+zueKggT4b6//pGZaihDO Rs4SRpbpcGJpFNNsbnam3u6aqD+reAY+BwsK/ND3KLczRty3Ab8iwkWATt+9xGHlUDk7UNN8G YwPHDr7jcaptMXOcSKy+0dUOmn/4V+oksdMYEScC9KCyAaebtHCLzpfZ7GKcUCdM2Lsigk69H PjKmMKQu6SVxAi0DtJy0CmyayRWI/JnbemQ8Aw9FR9KWcBEAUpn7weVGKZZdZr8s90tg= Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org The fresh new serial driver for pxa produces warnings when CONFIG_PM_SLEEP is disabled: drivers/tty/serial/8250/8250_pxa.c:50:12: error: 'serial_pxa_resume' defined but not used [-Werror=unused-function] drivers/tty/serial/8250/8250_pxa.c:41:12: error: 'serial_pxa_suspend' defined but not used [-Werror=unused-function] This removes the #ifdef around the two functions and instead marks both as __maybe_unused, which is more robust and avoids the warning. Fixes: ab28f51c77cd ("serial: rewrite pxa2xx-uart to use 8250_core") Signed-off-by: Arnd Bergmann --- drivers/tty/serial/8250/8250_pxa.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.9.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_pxa.c b/drivers/tty/serial/8250/8250_pxa.c index 3b08f342851a..31f27d95d8b4 100644 --- a/drivers/tty/serial/8250/8250_pxa.c +++ b/drivers/tty/serial/8250/8250_pxa.c @@ -37,8 +37,7 @@ struct pxa8250_data { struct clk *clk; }; -#ifdef CONFIG_PM -static int serial_pxa_suspend(struct device *dev) +static int __maybe_unused serial_pxa_suspend(struct device *dev) { struct pxa8250_data *data = dev_get_drvdata(dev); @@ -47,7 +46,7 @@ static int serial_pxa_suspend(struct device *dev) return 0; } -static int serial_pxa_resume(struct device *dev) +static int __maybe_unused serial_pxa_resume(struct device *dev) { struct pxa8250_data *data = dev_get_drvdata(dev); @@ -55,7 +54,6 @@ static int serial_pxa_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops serial_pxa_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(serial_pxa_suspend, serial_pxa_resume)