From patchwork Fri Nov 20 21:47:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7671501 Return-Path: X-Original-To: patchwork-linux-fbdev@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 33590BF90C for ; Fri, 20 Nov 2015 21:50:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 588F320458 for ; Fri, 20 Nov 2015 21:50:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 658C62049E for ; Fri, 20 Nov 2015 21:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759815AbbKTVum (ORCPT ); Fri, 20 Nov 2015 16:50:42 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:60076 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757174AbbKTVul (ORCPT ); Fri, 20 Nov 2015 16:50:41 -0500 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue005) with ESMTPSA (Nemesis) id 0Luphl-1aPz3P3LJB-0104a6; Fri, 20 Nov 2015 22:47:42 +0100 From: Arnd Bergmann To: Tomi Valkeinen Cc: Jean-Christophe Plagniol-Villard , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] fbdev: auo_k190x: avoid unused function warnings Date: Fri, 20 Nov 2015 22:47:41 +0100 Message-ID: <3917686.rD8ezhD468@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:EM8UNXdwlYJCSCjz5Q4TJhOpfeaIfQ5RqrWSV2Je9vyVKRH09Cn sMg8kF2S99Vu4PYMIv82ZI+8yiMy//P5HVjyY50Sxxd8mfoiik3PMpbOwJbWoF4FEd32qki ejY3OzLsCizvjxheLjvNNrXtW0g4LTvYb44a/7cAIG53VZ+CX7EW9SF/nogU/xemGXQtu+s GlpXn9zEqjXkqjgL9cOgQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:3aCGJjTgvr8=:wYSWO5PApDz1VgQZc1ZUQZ UuPaugq0rNFhXZpOy13BaB4jei+0p0k+OId9jBk5UVlSNZwxv5bZc3JVZCEvql+xKDQJqVJ4X FYemEFhplxBGbYECe0eF1Z3cAe8ntXbmgOVSE7mQkYAPURS5sOAOE0DO3AW1hJmN1ptowBS48 z2qipjeFP/BJCjPAJ3twpI0lTThoS/1e1MPp2020WYOI1ksEeLX33n9Cjj0cnDGHmrJytt5ut 0Thdg5IHXoB12jPzUGVZz1lVew+MPpgbekP6mTcveqjNkpk98jEqJQoc7sOv0I43bO8hjdNP/ Z91+rJj/rmPeeGBlnnECW6lQL9nP3ETllOmTgXss/PrkqxWk5RE524FihsDkC0CUvOrW5T5vN 99PImS8htelspgtdg6ZSQXCapqUOtqd9xG3yu32qWwh5FdqpNlOQ03i2QIGOifOGT0HGAybtL xPR0oBe45ul0zvDG7KfhVDteIkZOFCCcf8S/ueSpHej/bvlI3LmNY1Kca5li8E7X9BT6z6EGK O1pBs8Iy2lxcEhB7yp/FnVEa9SH+x8dE3PYoS1Xcppm7F5TdQuA1JwPVw6vjkjNf1gKMQiVqo 11UW23pS3H8UNL0fS6omLL1AiCcpXTXB6nCKoGiN4W+rXTFk8L1EBcX6AMnOVR03RQs+3kMVs oe1k7yNx3+OOZ8QOXYiVNewWkGzsfnUk0vJyDta+EcpqTm+mt+HuY/nRn23OsfiWq+ibm3Ukp xCAjHr+XMP2I3Weh Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The auo_k190x framebuffer driver encloses the power-management functions in #ifdef CONFIG_PM, but the auok190x_suspend/resume functions are only really used when CONFIG_PM_SLEEP is also set, as a frequent gcc warning shows: drivers/video/fbdev/auo_k190x.c:859:12: warning: 'auok190x_suspend' defined but not used drivers/video/fbdev/auo_k190x.c:899:12: warning: 'auok190x_resume' defined but not used This changes the driver to remove the #ifdef and instead mark the functions as __maybe_unused, which is a nicer anyway, as it provides build testing for all the code in all configurations and is harder to get wrong. Signed-off-by: Arnd Bergmann --- 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 diff --git a/drivers/video/fbdev/auo_k190x.c b/drivers/video/fbdev/auo_k190x.c index 8d2499d1cafb..9580374667ba 100644 --- a/drivers/video/fbdev/auo_k190x.c +++ b/drivers/video/fbdev/auo_k190x.c @@ -773,9 +773,7 @@ static void auok190x_recover(struct auok190xfb_par *par) /* * Power-management */ - -#ifdef CONFIG_PM -static int auok190x_runtime_suspend(struct device *dev) +static int __maybe_unused auok190x_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = platform_get_drvdata(pdev); @@ -822,7 +820,7 @@ finish: return 0; } -static int auok190x_runtime_resume(struct device *dev) +static int __maybe_unused auok190x_runtime_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = platform_get_drvdata(pdev); @@ -856,7 +854,7 @@ static int auok190x_runtime_resume(struct device *dev) return 0; } -static int auok190x_suspend(struct device *dev) +static int __maybe_unused auok190x_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = platform_get_drvdata(pdev); @@ -896,7 +894,7 @@ static int auok190x_suspend(struct device *dev) return 0; } -static int auok190x_resume(struct device *dev) +static int __maybe_unused auok190x_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct fb_info *info = platform_get_drvdata(pdev); @@ -933,7 +931,6 @@ static int auok190x_resume(struct device *dev) return 0; } -#endif const struct dev_pm_ops auok190x_pm = { SET_RUNTIME_PM_OPS(auok190x_runtime_suspend, auok190x_runtime_resume,