From patchwork Fri Sep 6 15:24:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 173257 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp865325ilq; Fri, 6 Sep 2019 08:24:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7AS2gItvmNez8INIdJDaOTAWLFajdORWPvCJxrEyHy5xRbE8Py5Cql16Ivga43C5Iyan1 X-Received: by 2002:a17:90a:cf0d:: with SMTP id h13mr10319400pju.122.1567783496184; Fri, 06 Sep 2019 08:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567783496; cv=none; d=google.com; s=arc-20160816; b=qHpcNiCEEvVQJOBRa3QkjSUFD7Qg8upGh8cX9yqUrmVmNcRYEMMbXDSwKDjYTh5d20 tP9abaapkcuzK9n/Lcvtcqkz9zSVuOqGRtzSqQ003S2Jf6Ew5df2b/z7wxEjBKELIdU3 T2HoKKZcReYkaTyNC3Z/TOLJDdth5IV2hEBuV3ErYo1WeboCn3gsBZLQivYa90q58cX0 3JSxvnq4BVRAnbkQUoMvDuoKIFApQRxN2Vyas0fjFwYycSv/GfSe6madIkKY5yEGR3AS iRBv2GFRwTj0KVJpaCqeyrShwDTZEaZr3xkjnGzwWiPE2oqex8SdfnIXSouI51QJLXdm sdYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=2aXh1dd6wqWyREAc5Vq9KBabuRWemeJ1L3YFV1LKNe0=; b=VmzWe/Huq7Z7O7hwRKFVDCcD+Ko2asbT1097/vKnn8mBSM8qNovCfxtGHEVZpXR0EZ 12X6n8U9mFd35tMo+xhx05JlcCq4S/uk7pCHiQ5/0redjXh4Pz4dIpBxwigKBn3mFDdu HNppn0vHmWdDoCrjuKR56ftQfLeW3xnT8A9O1+9ZWh+YpZplxSIbcs8g3uv0aPu7bOFy 3pGh4PvWohwItxibvsVa0ujEcc4zBO6PwjPG7L0C2T0pjzCRSOWFF2GNI+yIjDu/2BM5 TE6xqgjo8GXNMM3UL1iDVz05+56o4lkXynFHJLBERq1sgHVUwt/SyqjKn4dUf64EybRw 4kxw== 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 r13si4502213pgn.420.2019.09.06.08.24.55; Fri, 06 Sep 2019 08:24:56 -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 S2394787AbfIFPYz (ORCPT + 28 others); Fri, 6 Sep 2019 11:24:55 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:47235 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726019AbfIFPYy (ORCPT ); Fri, 6 Sep 2019 11:24:54 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MgNtR-1ieCGu1yVr-00hxJq; Fri, 06 Sep 2019 17:24:39 +0200 From: Arnd Bergmann To: Alessandro Zummo , Alexandre Belloni , Kevin Hilman Cc: Arnd Bergmann , Neil Armstrong , linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] rtc: meson: mark PM functions as __maybe_unused Date: Fri, 6 Sep 2019 17:24:29 +0200 Message-Id: <20190906152438.1533833-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:iAXw4+juZQ88e5MCxf8CxgonumKHmdb38haLq7aNwoHTl6DtoPC Z9GPHNRp0w/tJjiEzrdFIfQtJ5pxhtRdL+pDmwoKrwYL57eprTQvOXgSCFQPuyr29o4PnGW kZim5mMmM/k12IdaDCvf5Chnxe+5bimHjJ3PUFNF7AFhOfJDEx1L06QWv2Ub1xM/gCDNYFb FEXmyJk3f22Aen5NN8QMw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:ZlbboHLS25M=:nbSzMGw1TiiBYTW/Jn2ABL t6bsPlq1T8uhQiCGjZelLsQ8maUrd4/3e9VeJPNzuzACOgz38aM8zpjxcUnsTsOSABK1eubj6 PwFWvFkSTZcFXV245vVSil93R9kfP9WnmMoGIZPNUT8PXlGp5AQw8v+YPYZ3v7WNCAld1AMD0 ywH3pNCp54V5vLICDZPZNAM0kTguEV2kQ5EDE2beAPTQG7SXArH/9ZujIR2vhaC5LCY9pD0BL tmJSPxv/zYa/pdUE6i0rUABlEyngw4SyACVDHeTKd8/ZGmIJNm3rVy8aeRVf6ZKlcshiPN8Cf t2GAoZmq1P74mkbcgYaRAybt8RR79Irw9igE659MjsXorLaifnVinOauDka3WJJaKEyeEoZoc pc9n8fI2QS0S6VPpqKnnlYDM3+hezWY9NHiqUGrl4EQRtcn5AK0Fxl5ZvV/ZPJ8b6GPYntIp3 /VDxk8Ss6T8AoZysMdHSF2rkFNJKiq/9fLYY+dGX5vFrerQBfvOl/AbA4pCnd15UYAqWFt3Le yH3C335gyPj6YQ3UQBIgwyyjJTn3o+aMOd53ssfQQ4w27aKbrR7QApt9OCP/g3Kv6dId6DF/l NPPQ5Cxfl8djMyNhzSMiFvL8TDxYnN7w3s2UHoFz8CFL86I4/pzBLTxy3YUz/+TIGy/e2/HOM PW1xNwI6q+Xb/Fn6ieQ/n/4Y3ww0GJ61hLyCrlEGlSOjMFWuTLHLrqmPleglq7TGov8OdyvX1 G5vhUIbYZwMd0h487IPYU3jfG9z59wzVrap7c31npIvjd9hOPhWMtg9T22MUML2qoRmO/hA5P teP6FLOBRvCXWDX0xjfrMvf1dfA1wLAUpcFjxeeXHyk8yiYIsc= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The meson_vrtc_set_wakeup_time() function is only used by the PM functions and causes a warning when they are disabled: drivers/rtc/rtc-meson-vrtc.c:32:13: error: unused function 'meson_vrtc_set_wakeup_time' [-Werror,-Wunused-function] Remove the #ifdef around the callers and add a __maybe_unused annotation as a more reliable way to avoid these warnings. Signed-off-by: Arnd Bergmann --- drivers/rtc/rtc-meson-vrtc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.20.0 Reviewed-by: Kevin Hilman diff --git a/drivers/rtc/rtc-meson-vrtc.c b/drivers/rtc/rtc-meson-vrtc.c index 4621a4715179..89e5ba0dae69 100644 --- a/drivers/rtc/rtc-meson-vrtc.c +++ b/drivers/rtc/rtc-meson-vrtc.c @@ -91,8 +91,7 @@ static int meson_vrtc_probe(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int meson_vrtc_suspend(struct device *dev) +static int __maybe_unused meson_vrtc_suspend(struct device *dev) { struct meson_vrtc_data *vrtc = dev_get_drvdata(dev); @@ -121,7 +120,7 @@ static int meson_vrtc_suspend(struct device *dev) return 0; } -static int meson_vrtc_resume(struct device *dev) +static int __maybe_unused meson_vrtc_resume(struct device *dev) { struct meson_vrtc_data *vrtc = dev_get_drvdata(dev); @@ -131,7 +130,7 @@ static int meson_vrtc_resume(struct device *dev) meson_vrtc_set_wakeup_time(vrtc, 0); return 0; } -#endif + static SIMPLE_DEV_PM_OPS(meson_vrtc_pm_ops, meson_vrtc_suspend, meson_vrtc_resume);