Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760985AbbKTVun (ORCPT ); Fri, 20 Nov 2015 16:50:43 -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 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 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2599 Lines: 71 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 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, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/