From: Arnd Bergmann <arnd@arndb.de>
To: David Airlie <airlied@linux.ie>
Cc: "Krzysztof Kozlowski" <k.kozlowski@samsung.com>,
linux-samsung-soc@vger.kernel.org,
"Arnd Bergmann" <arnd@arndb.de>,
nouveau@lists.freedesktop.org,
"Seung-Woo Kim" <sw0312.kim@samsung.com>,
"Russell King" <rmk+kernel@armlinux.org.uk>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
"Alex Deucher" <alexander.deucher@amd.com>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Kukjin Kim" <kgene@kernel.org>,
linux-mediatek@lists.infradead.org,
"Ben Skeggs" <bskeggs@redhat.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Christian König" <christian.koenig@amd.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] drm: exynos: mark pm functions as __maybe_unused
Date: Wed, 18 May 2016 18:07:32 +0200 [thread overview]
Message-ID: <1463587653-3035181-5-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1463587653-3035181-1-git-send-email-arnd@arndb.de>
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.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 9be7e9898444 ("drm/exynos/hdmi: clock code re-factoring")
---
drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 58de5a430508..ea4b2b7d7ad7 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1934,8 +1934,7 @@ static int hdmi_remove(struct platform_device *pdev)
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);
@@ -1944,7 +1943,7 @@ static int exynos_hdmi_suspend(struct device *dev)
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;
@@ -1955,7 +1954,6 @@ static int exynos_hdmi_resume(struct device *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)
--
2.7.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-05-18 16:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-18 16:07 [PATCH 0/5] drm: fixes for merge-window regressions Arnd Bergmann
2016-05-18 16:07 ` [PATCH 1/5] headers_check: don't warn about c++ guards Arnd Bergmann
[not found] ` <1463587653-3035181-2-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-05-18 20:20 ` Emil Velikov
2016-05-18 16:07 ` [PATCH 2/5] drm: mediatek: add CONFIG_OF dependency Arnd Bergmann
2016-05-19 14:55 ` Matthias Brugger
2016-05-18 16:07 ` [PATCH 3/5] drm: mediatek: fixup drm_gem_object_lookup API change Arnd Bergmann
2016-05-19 14:56 ` Matthias Brugger
2016-05-18 16:07 ` Arnd Bergmann [this message]
2016-05-18 16:07 ` [PATCH 5/5] drm: remove unused dev variables Arnd Bergmann
[not found] ` <1463587653-3035181-6-git-send-email-arnd-r2nGTMty4D4@public.gmane.org>
2016-05-18 17:17 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463587653-3035181-5-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nouveau@lists.freedesktop.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=sw0312.kim@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox