Received: by 10.223.185.116 with SMTP id b49csp1030542wrg; Fri, 23 Feb 2018 10:38:31 -0800 (PST) X-Google-Smtp-Source: AH8x225H14APF//zEkn+gKmAn3xZR6p+kB3tFh0NgxXbkmxvtrEiCVDluMqIi37c9spMSb+w1+B7 X-Received: by 10.98.103.136 with SMTP id t8mr2657272pfj.177.1519411111592; Fri, 23 Feb 2018 10:38:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519411111; cv=none; d=google.com; s=arc-20160816; b=jqfay4WOXYSgpbQ+W35l81QN9HeVn4e/8GMGntViHZoIq5Qq9OBt5jYRvJasyVsSFB QgLlwl+yIvYD8BrjyXrKwZRF49toxblxKNiemXcuVleLYy31RUmh89bgvSWN3KdWCvMs sJ/s7laMcPgtk54NH9WbvyxHe/CfdltlsFYav/X6LSirfHipjmhqosjvTV2HfIhfrVZZ fQB4yyrtZRXT8LJFOI3dG66AWylGUF59ULp2wd97h8EHJ7FniIXUmWYPhjEEQ6IA4GGN Zxm4UTpgY0YFkOKXn1nSGSMjEUQIqOZ2G0Kr3Cn2jo2Lc1sGvaaduj9BsxYQzVHsXpDO YCXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Jnd4kX1NyzLRTiHNHo69scU2fqHxYmK44+XdVCDLw9c=; b=PRHoUw+kFNwzwiyEX0QOQsp+PqZmtsOtKS65I4JGQr/33wwsJMflnxJjb41WjE16x+ TOxm4wDRH0jwacpVbh7KDTnTJ8zceJULrPO1PAwa4QIn5A05ZyphiuBsRZHmlSdAkyhW sdJFo+hlV6pIhlqxtq8tDkYQDnFSrlxFAMFtttiJp3hFOw9GI8E0i532jjzeD/MfEspc VIaIa0G3QceaCeNdJYMoiS4RcKPYrwl3WRlbGigNuOw9nS3igAjpsMSAaLcHwrv0ay3k nbH/e1MV0JtSAHg3A3UB2rmsZORaHtDsV+6ijgaYjRqcCDdqp33S23zKmGzMlNBHZmM/ 5AZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si1841156pgs.277.2018.02.23.10.38.16; Fri, 23 Feb 2018 10:38:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932207AbeBWShg (ORCPT + 99 others); Fri, 23 Feb 2018 13:37:36 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38730 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932188AbeBWShd (ORCPT ); Fri, 23 Feb 2018 13:37:33 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D43C0BBF; Fri, 23 Feb 2018 18:37:32 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Tomi Valkeinen Subject: [PATCH 4.4 104/193] fbdev: auo_k190x: avoid unused function warnings Date: Fri, 23 Feb 2018 19:25:37 +0100 Message-Id: <20180223170342.232618179@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit a8a31afad5ffa1c7de0cef1c4bc383b50f426bf8 upstream. 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 Signed-off-by: Tomi Valkeinen Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/auo_k190x.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) --- a/drivers/video/fbdev/auo_k190x.c +++ b/drivers/video/fbdev/auo_k190x.c @@ -773,9 +773,7 @@ static void auok190x_recover(struct auok /* * 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(struc 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 devic 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 return 0; } -#endif const struct dev_pm_ops auok190x_pm = { SET_RUNTIME_PM_OPS(auok190x_runtime_suspend, auok190x_runtime_resume,