Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1732336imm; Fri, 6 Jul 2018 05:38:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeXVlZ7P31Dc8mSPKgEPyLos3MmImPz4CX0HIhbkWyV+Bgqcxmajp0HfkMw3RIMZSx3ushK X-Received: by 2002:a63:9b19:: with SMTP id r25-v6mr9014824pgd.197.1530880710033; Fri, 06 Jul 2018 05:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530880710; cv=none; d=google.com; s=arc-20160816; b=es/BZ6dFFqT2qdP7nb2Qc8KUyz4/vBfbPwTwsN+LRF7mHbVxljeuTh3pzAURb3bAyO YM0PpqRAwRdZAMsYdjdIfdaFrf0vunmqQi/H8/6E1QnQ6uLYwA7rL7MHUBVZiOXIAumJ fB1/agwpBFEg45e/g22RGABns6mzeJauL/rvR4OV16CN9WcamiTUPTlvX87Cfa3k1ThK T4lXn3pjjKIvehuXMDsYCh0d47YaPHgHIG70hOxU3v51ge04Aj3pNkLx+pJVRwSXAOpI j9fr5InDiiaqE7ntZ3E82WswAvAlGUh0zKkF7DMy6JFVRqFtUHLkGf+iWWLMDePPTpPP qZQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=bhz88nRPEp6JmayXdaudpsJMmkPX8NvF/AYvPRZhWc8=; b=tm3ixpFmFsvpZbPKGdapHiT7XqLVlY6HKQm8jxYEeBiYWCQduKM5Ep9F2H9/7PXCy6 Cl4D+UZexIGbJ1dWiah/LgA5/K6Q1UeZTYAN+BPJEaR2vhM5xmkx5b/f2sIntuyE4MN+ k+ikhg9Ujp8gfnfLymywd3XbyTBshTyE9gtib4srrvgWQmgm3bVSWkbWwsd5cb9VPOKw Naa2grPjfvImlUSDQ7dBS+Myvs/yjispyV8KajCstcrZIuvbjD0MCB66tqP6sdeyhyBd 3ghejDxCTSZw/bmkuM9BWju6znXJ1/BO2aA22s+G8hYJEfOeiKXw19mjwPuzrmqEfwi3 9qtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6-v6si1222648plz.423.2018.07.06.05.38.15; Fri, 06 Jul 2018 05:38:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932935AbeGFMhQ (ORCPT + 99 others); Fri, 6 Jul 2018 08:37:16 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:49715 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932648AbeGFMhP (ORCPT ); Fri, 6 Jul 2018 08:37:15 -0400 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 Cc: Arnd Bergmann , Keerthy , Dave Gerlach , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 }, }; -- 2.9.0