From patchwork Mon Jul 4 13:12:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102060 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1546100qgy; Mon, 4 Jul 2016 06:10:29 -0700 (PDT) X-Received: by 10.98.33.138 with SMTP id o10mr22399999pfj.151.1467637829352; Mon, 04 Jul 2016 06:10:29 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id io8si4203670pac.180.2016.07.04.06.10.28; Mon, 04 Jul 2016 06:10:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753416AbcGDNK2 (ORCPT + 14 others); Mon, 4 Jul 2016 09:10:28 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:53643 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753025AbcGDNK1 (ORCPT ); Mon, 4 Jul 2016 09:10:27 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0Lst7y-1bQ9YJ0Yck-012VEm; Mon, 04 Jul 2016 15:10:17 +0200 From: Arnd Bergmann To: Eduardo Valentin Cc: Arnd Bergmann , Zhang Rui , Rajendra Nayak , Lina Iyer , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] thermal: qcom: tsens-8916: mark PM functions __maybe_unused Date: Mon, 4 Jul 2016 15:12:28 +0200 Message-Id: <20160704131318.990672-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:SW0Fpk/ya3bUEpPtCYjZFWIet6C9Nmb/s3WHAGHe0wr42tO6h/R NgMaDz+oWDr0WqKhMTjVZOrsuE463Oi6iKqzRKJyde7o712uLm3X5C74OSXQHJWN/gYHrqE brCRLOGucyvoeo2N2P+7SQ1X8L1jVy0c6ARxyavODmHpxD9Y+SIGA7UZAj1Y3TMT+H15GM+ mFr7eMzAS+59G5A3JQzAQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:/JLooocLDLc=:kDY4YZRcJvnc5HCqSUNJtv nhJaI/y5M1QIHo4ctgTvjPF9olRVCML6dEujF6e3lfuZpJIg1ovVKR7LLbxRnDpngF7O6hWAa qumsabxeUxGK7PD2tD44H9TwtLBKo0UPHDA70Lsi+QSmN6hqifS/lAj1OJwFf+HBYmzubag0E R09rZHAavxW2z8sJI7EMAG4MQJ1W2DnZO0JY0LuMpAuWcm0ReN9hwzPGn5UE2SkQECYRZElPa bNsouw/YLHDm9YvDQ2LbZ+3oaF+8JXkaamgfKWjixjjoYKAx+W3boqeJroRCUAR3NBoR4ULRI 9DoNGGDk3VkaZhFi3t/ShvPRatdHDUPuPWt5J12VNmDiZv1zDftIb2WBbGU2fDfMTJGmR+K1G Qf+hwt6wyrsatOGpWCFz97aKG90z9aSQi2IXiv8WsDVtdrlGfjf0hCApuYGSYnh6rSM9QyXL/ V8xokSdMeISXL4wnvO+aB40mUlqAnXH7nu+BffaeuBSwua6vzHojLtPFBmSs2RZCzzKe7Nbm7 MZAoL5yuCE0fUgAxqGCwBpaaJEVDRcgzrqcdnQYr5yVXYy+m/C038Vnw7/4ATr8PkP6BXyKuP 0OdIPCAtKII1veeDxbpz9nxOIzE/fsr3BS71N1wvGdHwyWPotIu46B3ugD3g6adsaf0Fcu+x4 CsrXuI9Jze2zWtxrLIUo4jOfnD2MNbnRUgb7g4cy3bf+INKSYTUNFsYwaqcajaZsfqBc= Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The newly added tsens-8916 driver produces warnings when CONFIG_PM is disabled: drivers/thermal/qcom/tsens.c:53:12: error: 'tsens_resume' defined but not used [-Werror=unused-function] static int tsens_resume(struct device *dev) ^~~~~~~~~~~~ drivers/thermal/qcom/tsens.c:43:12: error: 'tsens_suspend' defined but not used [-Werror=unused-function] static int tsens_suspend(struct device *dev) ^~~~~~~~~~~~~ This marks both functions __maybe_unused to let the compiler know that they might be used in other configurations, without adding ugly #ifdef logic. Signed-off-by: Arnd Bergmann --- drivers/thermal/qcom/tsens.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 446f70b5dbb2..e4fca3350d26 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -40,7 +40,7 @@ static int tsens_get_trend(void *p, int trip, enum thermal_trend *trend) return -ENOTSUPP; } -static int tsens_suspend(struct device *dev) +static int __maybe_unused tsens_suspend(struct device *dev) { struct tsens_device *tmdev = dev_get_drvdata(dev); @@ -50,7 +50,7 @@ static int tsens_suspend(struct device *dev) return 0; } -static int tsens_resume(struct device *dev) +static int __maybe_unused tsens_resume(struct device *dev) { struct tsens_device *tmdev = dev_get_drvdata(dev);