Received: by 10.223.185.116 with SMTP id b49csp1030809wrg; Fri, 23 Feb 2018 10:38:49 -0800 (PST) X-Google-Smtp-Source: AH8x224xRLdRCTM4KgJp8L0V17LSNAU7kkhcRxw0JoFVMmHrJaNT+bcyW4mgD/NPZT6PRMgXca4A X-Received: by 10.99.129.66 with SMTP id t63mr2097979pgd.376.1519411129051; Fri, 23 Feb 2018 10:38:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519411129; cv=none; d=google.com; s=arc-20160816; b=AhsXK3vucwevjHovE1lxWqSBkNSmnAeqWHBrp29uKFwarzS69LjIyD8Fr4ArpI4C9E cXHIR87jJWouxKa4n7jvA/rNfqQgf9AuhgqNG8DKlNHVBCVbY+33mVoZlBjOP615vDo+ ClClvSlnbXISKc9U0jnqhCmDHCQDAdV14FcskS7VB0BaNZImEt6D2W1iqR7vl6nqm6TS lNmsVqkwRGD0gp8wqpLT/2z1CL3WawEoCLx45Sf7Uu9DJKmsotm+f7hQGS4tWBgYBGCo //zjbPRf3HMj/bu9NOnkI2iTW1fiXia3odItXzL0IvOuvVH01/l/7pCM3Hwjqz4BMtYg NwXQ== 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=AeEpOEnA4hW7FaYxxblmZY/GzwK8gjQwH1PLW3tSvcs=; b=w61lNunasIRQNrjxXNhrhbyQ44zvNahI1dCv7RfKGTLRI5Jb1lKr2TuFWHa6kegX3L eVVT7r6HkIs8PZ/MKFZnBaXNSAAEXI1WIvb6MaeQYC4D6Liv+fECMyqa7sRpRiLYTSRA sZ1PeRBzpRQr7iwZNt3UNQjYKITsrtWqYMJcBvsvdl5DaY6RVPrFllLabo3NWKLBL4ry KLlaFc2t+OWO5ZPk03jmlIgvH1IRq1mhU58vcMjVnprPWaw2n1j0NZiQP6+JzvnOCia6 OT2wShxP4ut8jc2Dl6V/A4xcoQ0EEq+jnQfmKXxhxgb+KS0RFyei86weQyZDbWELPgDi dijg== 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 y10si1412746pgv.456.2018.02.23.10.38.34; Fri, 23 Feb 2018 10:38:49 -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 S932230AbeBWShs (ORCPT + 99 others); Fri, 23 Feb 2018 13:37:48 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:38782 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754269AbeBWSho (ORCPT ); Fri, 23 Feb 2018 13:37:44 -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 E4F9BBBF; Fri, 23 Feb 2018 18:37:43 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Krzysztof Kozlowski , Tomi Valkeinen Subject: [PATCH 4.4 108/193] fbdev: s6e8ax0: avoid unused function warnings Date: Fri, 23 Feb 2018 19:25:41 +0100 Message-Id: <20180223170342.858514771@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 b54729b6cea7d1f46b1ed70cb7065c6bdefaa780 upstream. 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 Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tomi Valkeinen Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/exynos/s6e8ax0.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) --- a/drivers/video/fbdev/exynos/s6e8ax0.c +++ b/drivers/video/fbdev/exynos/s6e8ax0.c @@ -829,8 +829,7 @@ static int s6e8ax0_probe(struct mipi_dsi 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_d 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_ds 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 s6e8a .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)