From patchwork Fri Jul 6 12:36:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10511529 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 2176560325 for ; Fri, 6 Jul 2018 12:37:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10631285FB for ; Fri, 6 Jul 2018 12:37:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0419C285FF; Fri, 6 Jul 2018 12:37:23 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A4BF5285FB for ; Fri, 6 Jul 2018 12:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=iuEI879f04ZkhMp1jlFRYiNbTY49AU2J4CHGmmQi8Jg=; b=gry HKyj3d1CliEY1CLJHciyMzxtSusl34PqnvIFUC3KdsEpC0vV6zdoYqjWU8Z8QThi3/MkynIueL0oD kdL1Jtpy6ae6x4Us9I7WCX7U7MQZTs6zGuhlUYwo6Uz0mTRwi1oWrupEaoeBzGplzkTlmK5erBaeM fND5CxKX0MwqxiunqO7HJomfqVyo6ZgntI0V2sGBWholpxJEtas1l8urVAgwujsQH8W4uxqVu4OZq 27wnGiVlCSqPrN2J4TJSmVu0q3+4v4iVYVxyFDT/aozIabw72YOgp2pkx6C5VLJy/u0uoWRg5nYiA x3hLNnoPpNGUL8Jtk8+p8uUyMfohGqg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fbPz7-0002qp-H2; Fri, 06 Jul 2018 12:37:13 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fbPz3-0002oz-SG for linux-arm-kernel@lists.infradead.org; Fri, 06 Jul 2018 12:37:11 +0000 Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0MWKkb-1fdGZh3Pg1-00XMr5; Fri, 06 Jul 2018 14:36:52 +0200 From: Arnd Bergmann To: Santosh Shilimkar Subject: [PATCH] soc: ti: wkup_m3_ipc: mark PM functions as __maybe_unused Date: Fri, 6 Jul 2018 14:36:42 +0200 Message-Id: <20180706123651.2792927-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:XO7zxN80Y7OMNqU6s/2rICIJBdA+43v8Yxil0Xoo5s9+UG8hWmU 9Y11rhkEw4wZJARQ++MjS3cf4EigmAPokXZ+1RLOCX6wIBzWuvfChRgnYOKJMFGfoMIwfj+ Lhjggt+0FAOY965KfWShOUZ2fWOr94CZhQij2aR+o4zbL9pZKcQ3WL+13T/abBh6C/fZyzQ +ivtTuDQBGJt2r9n05L+w== X-UI-Out-Filterresults: notjunk:1; V01:K0:7UGE06OWmNA=:Xist6ZLdGTs/5o/003lSW8 7hx4zsNftk8DpSTJ7NHlgYl9I5K7tPbN05m+E702dF5JuVI4hvyWi5WvnOGF6IEx/QElAAZtU MFXI/aLIPJ1t3XJsPyLkLNeYrWV8j/52ZABVcTPaLf3Z01a/vI44xFX8Qo2rbWJBbR24W2Ifq h/NEPNTg3kWIzW24SIDayCCs2k8YuQpzKMwyskBnZ5y9dNQj7uYUB9rDEvdKKfixzQBP+WoXx cTZF/0mXvUipCL282aHMKu8DvxpM/tpWofTRW8HBX3Au4yA37PdrHRl5L3UgORzsi0thCtxDT bb4QeYynjBjLbjzNZ+Tbs7WZvEgUtic2BH3Tuj9UciHzOLaE+wRWc6ohB8afJyuIqaJIr0XvS yXrrSPs4xXvTb4r8FvGCuxdckSoJ+hbIo2E1+eKw3VmtPANRjEi1GLQEihxjgd2lQATph4BKk 6pp+c1uSEMGmVisQwSUOxTFIqCd0lply69BuXYZU2k7+RXj+ChWNadpw8mh5JwR8ODRR4xRu3 zmtTBGqrHZl67bQWtAXVjiHM093OFSPwRHYmv+BX8ZL7DTxT4zD8V0WmvH1QWD7e9C1TxMwIH CO++BfO95KhXKkAeE3zpnGA2MzuVpWgYwTd9HToA4HMPtAqgthVDnYdbIKOQ9KHcJE51Lqy1B 0g2xgRlMH2UbQyv5DCzcK/84GK14jS8UZv747t7KsQKctsc759TMdPeh3FT4mcJGg3Js= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180706_053710_212168_276B7896 X-CRM114-Status: GOOD ( 11.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Keerthy , linux-kernel@vger.kernel.org, Arnd Bergmann , Dave Gerlach MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Everyone gets these #ifdefs wrong, leading to another warning here: drivers/soc/ti/wkup_m3_ipc.c:547:12: error: 'wkup_m3_ipc_resume' defined but not used [-Werror=unused-function] static int wkup_m3_ipc_resume(struct device *dev) drivers/soc/ti/wkup_m3_ipc.c:539:12: error: 'wkup_m3_ipc_suspend' defined but not used [-Werror=unused-function] static int wkup_m3_ipc_suspend(struct device *dev) The easiest way to get it right is to remove all the #ifdefs and let the compiler drop the unused functions silently after we mark them as __maybe_unused. Fixes: 7a872b6fb7fd ("soc: ti: wkup_m3_ipc: Add rtc_only with ddr in self refresh mode support") Signed-off-by: Arnd Bergmann --- drivers/soc/ti/wkup_m3_ipc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/soc/ti/wkup_m3_ipc.c b/drivers/soc/ti/wkup_m3_ipc.c index 6840688236b9..f5cb8c0af09f 100644 --- a/drivers/soc/ti/wkup_m3_ipc.c +++ b/drivers/soc/ti/wkup_m3_ipc.c @@ -535,8 +535,7 @@ static int wkup_m3_ipc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int wkup_m3_ipc_suspend(struct device *dev) +static int __maybe_unused wkup_m3_ipc_suspend(struct device *dev) { /* * Nothing needs to be done on suspend even with rtc_only flag set @@ -544,7 +543,7 @@ static int wkup_m3_ipc_suspend(struct device *dev) return 0; } -static int wkup_m3_ipc_resume(struct device *dev) +static int __maybe_unused wkup_m3_ipc_resume(struct device *dev) { if (m3_ipc_state->is_rtc_only) { rproc_shutdown(m3_ipc_state->rproc); @@ -559,7 +558,6 @@ static int wkup_m3_ipc_resume(struct device *dev) static const struct dev_pm_ops wkup_m3_ipc_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(wkup_m3_ipc_suspend, wkup_m3_ipc_resume) }; -#endif static const struct of_device_id wkup_m3_ipc_of_match[] = { { .compatible = "ti,am3352-wkup-m3-ipc", }, @@ -574,9 +572,7 @@ static struct platform_driver wkup_m3_ipc_driver = { .driver = { .name = "wkup_m3_ipc", .of_match_table = wkup_m3_ipc_of_match, -#ifdef CONFIG_PM .pm = &wkup_m3_ipc_pm_ops, -#endif }, };