Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753025AbcKHOwO (ORCPT ); Tue, 8 Nov 2016 09:52:14 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1620 Lines: 48 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(-) 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) -- 2.9.0