Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1569264ybe; Fri, 6 Sep 2019 21:42:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+TEiq6pKYw/5wXB1Z5n+cG7zVQmu57WhNbxwZW6eaUDyiKEhohlTNeoUOeYqsrpG/pqWc X-Received: by 2002:a62:cdca:: with SMTP id o193mr15159881pfg.204.1567831366446; Fri, 06 Sep 2019 21:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567831366; cv=none; d=google.com; s=arc-20160816; b=nRLe+4RoB9XbMJkirqbXNxN/lFObhajocE4ASePMmUYGYj6nXx/XxybWiQSqhjdSOr b8MxNF2upSdlDi3jS3obF9+ZuPZyM30o/FqCVrxoiBz19uyMH8PG5phAiP9gBueBT0JK eFzS6UD5LQIZ6CUZLc5peUqlVE+rWkeAjr/j92snEsVJI7SFiKM2gxiKwYUeM7NKtvG2 Vuvidk3lU5z5Kq/+iAId1fVrRf46tplen4acTVDREPO9ms8qaspY3n9dv1wwJylfnyh8 PpVTCCJt3n+K0yQ3yzo9+mAw8WSXI+IkEjIHXNFh98wIl0GcOOtHqVfofjZDMuhYgmOm 074w== 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 f4si6036442pgg.334.2019.09.06.21.41.54; Fri, 06 Sep 2019 21:42:46 -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 S2394774AbfIFPYz (ORCPT + 99 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 Content-Transfer-Encoding: 8bit X-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59wzVrap7c31npIvjd9hOPhWMtg9T22MUML2qoRmO/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(-) 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); -- 2.20.0