From patchwork Sat Apr 16 20:19:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8861951 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EB034BF29F for ; Sat, 16 Apr 2016 20:21:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2AF5820212 for ; Sat, 16 Apr 2016 20:21:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5752520204 for ; Sat, 16 Apr 2016 20:21:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbcDPUUo (ORCPT ); Sat, 16 Apr 2016 16:20:44 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:55398 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751574AbcDPUUn (ORCPT ); Sat, 16 Apr 2016 16:20:43 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0MUxEy-1bGtl51lFc-00YDOf; Sat, 16 Apr 2016 22:20:31 +0200 From: Arnd Bergmann To: Eduardo Valentin , Wei Ni Cc: Arnd Bergmann , Zhang Rui , Stephen Warren , Thierry Reding , Alexandre Courbot , linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] thermal: tegra: mark PM functions __maybe_unused Date: Sat, 16 Apr 2016 22:19:33 +0200 Message-Id: <1460838026-1242452-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:5egZPNho0y7o/qbJ9YarbW8PuwF8+1NkfE7yp6D69HDhHraYoU4 xMAT2DcQoC7h/mVhcVT1dwQyilHVPXUYr8f3a9/DObPlnGXnkWkQEN5H/G3B6ZTKLmm9CDC M6iWnBvjXZDPR/mtuuyqrJYAglOMQCpriM95CttSsewzdY9sdLYSrdN9o0ZWMG2Ueut/1lZ r/2hTFhpGw2k/OVVR9eKA== X-UI-Out-Filterresults: notjunk:1; V01:K0:/x9im3k0psw=:PsqQk0BKsjoCYRNIJ3W/Wt nRXJe4QAJ0fc7RQI07DajVWvfyS7l8yqNCvQ1RQ/yom+fdpNp+HdtUJQExJM7uldCp3QQXBdj sOPleqlBKZBJATlcenyCp60WSOPCwWaV8+nUjDK2A81AQjOrT0+diiMsgIi9ynpkaxPIqqcEf Z0RzqFQw8lpioUoZZT59K7PJ9DE12//nwmXRF2+EIkQ4xG8AIMBvmuutC8KbIcG/6gA+8kKkb Mhk14lDXVvewvrVtIFZbpxZcepqDrnHAzqxtA6WQnGGM4sPlApD/ogtVjhyQJph1BHUMl4KO2 f7S8a4MdYCT3COYADT2NXeSfNqe3n36WEQTVW/YrdP7G9hQvIi1xaD1yEXJRVOUMTZNvEPuvd XbNTtZTvBkW5RgLKhiXkN/L0+JdRoTVTPnpW6egJx4g9WW9YUcgRWpscwYFCp30Uh/D0BWsPL wdZQIJOP21p8ePOpcWdO7Bqfp/SeIlwBwzPx16fQsP9NQsQIdiCJbDVgJlcAtJvXxJhb065cV 4zAhdCc4IX7HVnQShj8b7F6VQYm6aLvv7L0JzBVzuN+9v/4wAYCo3YYQOxSpkq9Zp1ttZp7CG IrQPphVXIU+n4pf1WXWlaSN2CgJy1lFA44c2W089H5MRzTiygHCIc/7Kyl3JCoiC8X1vMjqh5 ptykL7DDr+5Ex92kZ+5HPrVJ5y0lS82yZLfAdFkAmwmkGGFOcmIVkgY1LdAmC1EP0cFY= Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP After the PM support has been added to this driver, we get a harmless warning when that support is disabled at compile time: drivers/thermal/tegra/soctherm.c:641:12: error: 'soctherm_resume' defined but not used [-Werror=unused-function] static int soctherm_resume(struct device *dev) This marks the two PM functions as __maybe_unused to shut up the warning. This is preferred over adding an #ifdef around them, as it is harder to get wrong, and provides better compile-time coverage. Signed-off-by: Arnd Bergmann Fixes: a134b4143b65 ("thermal: tegra: add PM support") Acked-by: Thierry Reding --- drivers/thermal/tegra/soctherm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index 559c74279eb8..be829d6e131c 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c @@ -629,7 +629,7 @@ static int tegra_soctherm_remove(struct platform_device *pdev) return 0; } -static int soctherm_suspend(struct device *dev) +static int __maybe_unused soctherm_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -638,7 +638,7 @@ static int soctherm_suspend(struct device *dev) return 0; } -static int soctherm_resume(struct device *dev) +static int __maybe_unused soctherm_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct tegra_soctherm *tegra = platform_get_drvdata(pdev);