Received: by 10.223.185.116 with SMTP id b49csp1086690wrg; Fri, 23 Feb 2018 11:41:23 -0800 (PST) X-Google-Smtp-Source: AH8x2267ao8m5ExgToUrGeygzEeUw1puRV4fyydSs023k56+EaJXFJTBKBXb73XqDyuqvc34Mj35 X-Received: by 10.99.121.140 with SMTP id u134mr2201959pgc.89.1519414882904; Fri, 23 Feb 2018 11:41:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519414882; cv=none; d=google.com; s=arc-20160816; b=lLoLbkoNHigQ9DtG825AIvbx6d2uuxsneI/lVYZnhAIYGNA3kRyUv5mvmcpwOVSUCi znirzPhSaHqRMzXLk51AefigKYJR45VoHW+x28wVI20nKdSDnON03L9TPvBkYc5ctA9Q MRm0MECv0f1OOF2bAxIJ3GY5iyGYJia+4aDjXOt+vpPln9HWFZEp0CMD+hvW2rMPSrpS jOfQ4t7lpkKwhuI5sSBD+9kOSHmR5/N3UNwNYGh5hsrdrzA/r1uAvXC9wL1qzZFMxKzw cxWeKDqjktczcI+OmwHHXG1m5zaaNwshjZ/9wAVGlrA6eW5XmNBHRbHrv3VGvit089Pw LZHQ== 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=ZLHlBkPX3vH2jBkN8KIacoHTRZj8/Gh9ufbPEcbyCh0=; b=vGGkNKXXawO2i2xWWjjCsvtoxpNNz3yCtq6Nj3tYyszYMiQQ5d8vanujg7ncgMH4xj IKU1fkAWps4KzoTDAFKOfIzifpD++p3YIal3+lLfur5ZrZ0whHZIcFiPZZ/qt1hhBva1 TD6hxrclZHeXmRDwA5aj+fXUzm4Dckn+CYErJkSZKY1aqyc/Nr5S+pV36L3OgIOUFgqa 0ETSl2tqd6I9A0ZgzfCL5lespp9/zWH3vfvOVohlrJlNZjAD9Kee6EvEglipj2cF1co+ yyEmkzmEkNuncvK7fL0gFH8RMVvpLFeMJUk5RUyqnusmBkjuyh0z4L75trr7tzp/3Vb9 Tiog== 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 i7-v6si2292680plk.139.2018.02.23.11.41.08; Fri, 23 Feb 2018 11:41:22 -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 S934520AbeBWStV (ORCPT + 99 others); Fri, 23 Feb 2018 13:49:21 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:45230 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934483AbeBWStS (ORCPT ); Fri, 23 Feb 2018 13:49:18 -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 7F3FF1180; Fri, 23 Feb 2018 18:49:17 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Inki Dae Subject: [PATCH 4.9 121/145] drm: exynos: mark pm functions as __maybe_unused Date: Fri, 23 Feb 2018 19:27:07 +0100 Message-Id: <20180223170740.469982248@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@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.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 7e1751001818209b214b8c3df0b3c91fae250ea2 upstream. The rework of the exynos DRM clock handling introduced warnings for configurations that have CONFIG_PM disabled: drivers/gpu/drm/exynos/exynos_hdmi.c:736:13: error: 'hdmi_clk_disable_gates' defined but not used [-Werror=unused-function] static void hdmi_clk_disable_gates(struct hdmi_context *hdata) ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/exynos/exynos_hdmi.c:717:12: error: 'hdmi_clk_enable_gates' defined but not used [-Werror=unused-function] static int hdmi_clk_enable_gates(struct hdmi_context *hdata) The problem is that the PM functions themselves are inside of an #ifdef, but some functions they call are not. This patch removes the #ifdef and instead marks the PM functions as __maybe_unused, which is a more reliable way to get it right. Link: https://patchwork.kernel.org/patch/8436281/ Fixes: 9be7e9898444 ("drm/exynos/hdmi: clock code re-factoring") Signed-off-by: Arnd Bergmann Signed-off-by: Inki Dae Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1939,8 +1939,7 @@ static int hdmi_remove(struct platform_d return 0; } -#ifdef CONFIG_PM -static int exynos_hdmi_suspend(struct device *dev) +static int __maybe_unused exynos_hdmi_suspend(struct device *dev) { struct hdmi_context *hdata = dev_get_drvdata(dev); @@ -1949,7 +1948,7 @@ static int exynos_hdmi_suspend(struct de return 0; } -static int exynos_hdmi_resume(struct device *dev) +static int __maybe_unused exynos_hdmi_resume(struct device *dev) { struct hdmi_context *hdata = dev_get_drvdata(dev); int ret; @@ -1960,7 +1959,6 @@ static int exynos_hdmi_resume(struct dev return 0; } -#endif static const struct dev_pm_ops exynos_hdmi_pm_ops = { SET_RUNTIME_PM_OPS(exynos_hdmi_suspend, exynos_hdmi_resume, NULL)