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: 118246 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp1717609edm; Wed, 8 Nov 2017 04:08:39 -0800 (PST) X-Google-Smtp-Source: ABhQp+SKoiK03BbqNNc1RDC686wEpeOdTBRmCQovGHcaVv9U1olVIk6ML2/uQHU9k7TAvSw7GQ5B X-Received: by 10.84.218.65 with SMTP id f1mr257891plm.145.1510142919277; Wed, 08 Nov 2017 04:08:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510142919; cv=none; d=google.com; s=arc-20160816; b=kM3jQhouCu8P1B9zMredMpKUWh6XUvaVV9sN4QTFrJJli+khaXPEMzX7wAbCIM6Rmu OR4UvcQu7RjqaQFLrIMcvIGW1U9NhQQ/xOeXR6MWztfx3fpNrUQhy6/sRumOlnzYiLKs dV5125wrxUtNKE3dpPvIrK8fcbAXOpFForyWpsqWLKp/FlFvzqF/uYuStVPjmI9hMLuB zIFOCd/KS/ONi4eGFlaLMP++CMSVqTWqJYz3FOxgTkvceFJA/Qf061BFuowaPkPC71ZS vRQkZOzSPMX/56Tbp7tKWs51v9K9n+NY8JMQanPD/Lr536eF/IY6ilZYuopY34D9/5p+ FYaQ== 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=tU8KpNxbM8XPLUW0DBBnBwGaPoU8fipBYEAg8Xgd+o8=; b=iQAXT+ea4AHerKFekAaFV+9HUHXMl0xSy/FpMo7Sx7UkKqY2pmX1MGDjIa3MrXNMbA 3kmVETlsR/0k31pUXkGV06Tsh5pydLSlwEKv97jnv9n7s4HFyI6BHEoxPBIO0nfjTKns DU4jumYNvm0dnKrXRZcAknJ0lgwkM/uIQGcMFYC7hQh0Ek0oOFrvkKZ9FakVLcgW3Z3C MmiJi+qo4U42kZuXJ1aa9CapLq0Yp04OMLwN6bclj3Rf3S3+Mf7FwT5Nh9rO1o8nLZq2 QgxDE68D1l+bas6uSjbOGu999arhCv65iTwnCS02WF+Iy6JIlCAtvqk106K5ehJOQQnV jU2A== 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 1si3669914plw.224.2017.11.08.04.08.38; Wed, 08 Nov 2017 04:08:39 -0800 (PST) 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 S1752302AbdKHMIg (ORCPT + 21 others); Wed, 8 Nov 2017 07:08:36 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- drivers/rtc/rtc-xgene.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.9.0 Reviewed-by: Loc Ho 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);