From patchwork Wed Nov 8 12:08:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 835785 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-rtc-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yX4nx0F93z9s7c for ; Wed, 8 Nov 2017 23:08:37 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752242AbdKHMIf (ORCPT ); Wed, 8 Nov 2017 07:08:35 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:56010 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158AbdKHMIf (ORCPT ); Wed, 8 Nov 2017 07:08:35 -0500 Received: from wuerfel.lan ([109.193.157.232]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0MWBZZ-1ejZ5E3Lc9-00XPMh; Wed, 08 Nov 2017 13:08:17 +0100 From: Arnd Bergmann To: Alessandro Zummo , Alexandre Belloni Cc: Arnd Bergmann , Loc Ho , Mark Brown , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rtc: x-gene: mark PM functions as __maybe_unused Date: Wed, 8 Nov 2017 13:08:10 +0100 Message-Id: <20171108120815.3175571-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:UafjScl3PyxHG+Gzkw31/mKCsS524n6KISZNKMsSiVYMAniD9xN dMG4YHOU9zlXFFDxowL0E8TWTIeH49ogNxnyqwSuGozNd8D23BkPtdREBAjyfr0y+BxhG/K Aqjx07QaIuW6p6vVcwU3TduLJt6GdbZAMZ8Yf13Ccq2HW/kiTAVurNeukdXbGZUwMetzJHM 3fxBga7e+bouftfNAv9sg== X-UI-Out-Filterresults: notjunk:1; V01:K0:zKckIg01q/U=:0o2zbjqBfQMaDecyNRg5Xe NTmnHk++hFylCBegNL+j82uNI966iJCIMGkPBMGdD0Pi2KLy5pNDNa0RRn+k71mwRnO4j/LhO RxE6hG1N2i5MVeaVsAVFSQkvNICpv6pQpMohlbLYMC70Ymt3An27yrfbOidl53Wh2L4x/giz3 v8jeAKAdsY7fJDwBGQlNHVJ5VpETYJtIMP4rFZ/gW1YAnypO5weOR2uVbCDir6fvaqI53CDcS sSl+9hRKKJADIFxhbw84CQwI9YDdNICqEKqb6lMz80bMibbJ40tC5Ho9VPsBoXERO/0NcFp7F ASqs8FXMyZgfHlPaOE+swa+Ewl8xht7nBu0S9igYqL2DrrTLTF5MN9HlhzqyYUC2fna4o9fAT NMcrxZ87mcQFKR2dhbV0rBXUgmBycs4qcCrefHqeIaHdePsrkT9ajlTPm5ZWtR7xLqc8RFFIV /4lyYPqrJCIHUJn/M4FM37nOJb32Lmt52NVa6IHFIBYEDsxEX7bv9CehzvLm5Ny6lHyzyeJ1h m14sfEXa5g+hJm0FX25o6GbLYjzI7q04qmk4w8IdCiO/Bay7mZXBpnUpMii3JKCGwzarcnJnA WDTumKYguCwKQsnGbKYBkmdsRj0BuUOag1CwndjChy6p7ovCXFEm9TKrOIChPt8vskcry2MtV Oe987HAL1F4OUoF5u7oYYVZiuLiAxdiDbe7Ve0PJ9AW0QFvGhC+tfV69fZJJdihoB9V7HfGaE sUviZquP2Ym65+MlNEvWYo4QZvCJH58ANXyjpA== Sender: linux-rtc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org The new xgene_rtc_alarm_irq_enabled() function is only accessed from PM code, which is inside of an #ifdef; this causes a harmless build warning when CONFIG_PM is disabled: drivers/rtc/rtc-xgene.c:108:12: error: 'xgene_rtc_alarm_irq_enabled' defined but not used [-Werror=unused-function] Just remove the #ifdef and use __maybe_unused annotations instead, to make the code more robust here. Fixes: 9f8f1c8b727d ("rtc: Fix suspend/resume for APM X-Gene SoC RTC driver") Signed-off-by: Arnd Bergmann Reviewed-by: Loc Ho --- drivers/rtc/rtc-xgene.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-xgene.c b/drivers/rtc/rtc-xgene.c index 360eae24a8c8..0c34d3b81279 100644 --- a/drivers/rtc/rtc-xgene.c +++ b/drivers/rtc/rtc-xgene.c @@ -221,8 +221,7 @@ static int xgene_rtc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int xgene_rtc_suspend(struct device *dev) +static int __maybe_unused xgene_rtc_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev); @@ -246,7 +245,7 @@ static int xgene_rtc_suspend(struct device *dev) return 0; } -static int xgene_rtc_resume(struct device *dev) +static int __maybe_unused xgene_rtc_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev); @@ -271,7 +270,6 @@ static int xgene_rtc_resume(struct device *dev) return 0; } -#endif static SIMPLE_DEV_PM_OPS(xgene_rtc_pm_ops, xgene_rtc_suspend, xgene_rtc_resume);