From patchwork Mon Jan 25 15:04:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101135 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1412270lbb; Mon, 25 Jan 2016 07:08:24 -0800 (PST) X-Received: by 10.66.102.70 with SMTP id fm6mr26505304pab.80.1453734504795; Mon, 25 Jan 2016 07:08:24 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y9si5048924pas.124.2016.01.25.07.08.24; Mon, 25 Jan 2016 07:08:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-fbdev-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-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757338AbcAYPIX (ORCPT + 2 others); Mon, 25 Jan 2016 10:08:23 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:52223 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756446AbcAYPIW (ORCPT ); Mon, 25 Jan 2016 10:08:22 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue002) with ESMTPA (Nemesis) id 0LiKia-1ZpkrV3hjI-00ce2b; Mon, 25 Jan 2016 16:05:14 +0100 From: Arnd Bergmann To: Tomi Valkeinen Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Jean-Christophe Plagniol-Villard , Kukjin Kim , Krzysztof Kozlowski , linux-fbdev@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fbdev: s6e8ax0: avoid unused function warnings Date: Mon, 25 Jan 2016 16:04:03 +0100 Message-Id: <1453734300-1958304-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:kDAx/A3mnYTnEXn5qK///1KbSsP5kpGG8htIHdATOuLwOHkE1Qg b5EpTw7pVv8rua4qoQE4+/2wkGI1+RDYFmnW42f1C9KJRCToqDbYyoJ1shipmbqywrxW/b5 JcTLT2McoTj0YIJeuJmHu+D21nvjAVFkEHD7Al8BwoZcLeqtNuAgS1+CBHmttroCGEG/P+D 1U57X+qSThbZaKM7FRj1w== X-UI-Out-Filterresults: notjunk:1; V01:K0:8w727vv5DSw=:pX23eRlggyOpQmS7QOGH7f CRfGBEe6zNqoLXRimkrZJW7SDHKZ2+FsSr/axfr57I1bymSK3IrJ0RdcKZjvv4cncdexVW96s alHJr9nZlj+RMmvbUaDEUAd3E8AmfgTHd9EzByp+vOgOI7dtn8x6L/VO2A30+CESHrjHB/miS NXWGePk0v4GGbVROt9ujBbbh9iQkREgCAei6Orx2CtILIwbJux3LCmk3lI/GxSs8TzlFA9EWG 4+Kc2INJ3635Zby7BHe6QFAZU32Irl1vnB/yGz8LoYlavu0MeoZqOJDgEhWQq5Dr8Mf8l6sfi 3iySySZ1VchGaI9NaY7xiDUs64hZ1OLoJhcCiWVIFZ1UVGQxusHB9nMzFAIBwHrRom+vYZyZr 537Gc02wF5cuDSgO3+r0QKqcoxNwmOw2DtZ0sVozrv2as1GfkwLSvGPSGwZIg5mv/B/0m0PKf l4vqtfzP8Ul3GTaSB2H5Na8UzyfphpQqzY6qPJfNZJkMatUHm31vl0mfNzfF+TUsU1ahG0bK6 amT0F96QGKV7nwQOWA28vreEL3ZSmTY2hN7ze1nfm57SIgvvJX136uCrCAyMPcsnE+yFW9Yne DWR3DZYu9mtTXYgTLppdaJQK1xsRnDE42kwniGwtD3pJtIjZSdP8StrrfrrTd1TC25DUvRAd2 H5jhq38bnj58x75iXeyvq9ytGp3mfqD1nxhkJtvYZvxerHnAKp5J/9bfGjVDCMDcKB6I= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org The s6e8ax0 suspend/resume functions are hidden inside of an #ifdef when CONFIG_PM is set to avoid unused function warnings, but they call some other functions that nothing else calls, and we get warnings about those: drivers/video/fbdev/exynos/s6e8ax0.c:449:13: error: 's6e8ax0_sleep_in' defined but not used [-Werror=unused-function] drivers/video/fbdev/exynos/s6e8ax0.c:485:13: error: 's6e8ax0_display_off' defined but not used [-Werror=unused-function] This marks the PM functions as __maybe_unused so the compiler can silently drop them when they are not referenced. Signed-off-by: Arnd Bergmann --- drivers/video/fbdev/exynos/s6e8ax0.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Krzysztof Kozlowski diff --git a/drivers/video/fbdev/exynos/s6e8ax0.c b/drivers/video/fbdev/exynos/s6e8ax0.c index 95873f26e39c..de2f3e793786 100644 --- a/drivers/video/fbdev/exynos/s6e8ax0.c +++ b/drivers/video/fbdev/exynos/s6e8ax0.c @@ -829,8 +829,7 @@ static int s6e8ax0_probe(struct mipi_dsim_lcd_device *dsim_dev) return 0; } -#ifdef CONFIG_PM -static int s6e8ax0_suspend(struct mipi_dsim_lcd_device *dsim_dev) +static int __maybe_unused s6e8ax0_suspend(struct mipi_dsim_lcd_device *dsim_dev) { struct s6e8ax0 *lcd = dev_get_drvdata(&dsim_dev->dev); @@ -843,7 +842,7 @@ static int s6e8ax0_suspend(struct mipi_dsim_lcd_device *dsim_dev) return 0; } -static int s6e8ax0_resume(struct mipi_dsim_lcd_device *dsim_dev) +static int __maybe_unused s6e8ax0_resume(struct mipi_dsim_lcd_device *dsim_dev) { struct s6e8ax0 *lcd = dev_get_drvdata(&dsim_dev->dev); @@ -855,10 +854,6 @@ static int s6e8ax0_resume(struct mipi_dsim_lcd_device *dsim_dev) return 0; } -#else -#define s6e8ax0_suspend NULL -#define s6e8ax0_resume NULL -#endif static struct mipi_dsim_lcd_driver s6e8ax0_dsim_ddi_driver = { .name = "s6e8ax0", @@ -867,8 +862,8 @@ static struct mipi_dsim_lcd_driver s6e8ax0_dsim_ddi_driver = { .power_on = s6e8ax0_power_on, .set_sequence = s6e8ax0_set_sequence, .probe = s6e8ax0_probe, - .suspend = s6e8ax0_suspend, - .resume = s6e8ax0_resume, + .suspend = IS_ENABLED(CONFIG_PM) ? s6e8ax0_suspend : NULL, + .resume = IS_ENABLED(CONFIG_PM) ? s6e8ax0_resume : NULL, }; static int s6e8ax0_init(void)