Skip to content

Commit 4158dbe

Browse files
arndbdaeinki
authored andcommitted
Subject: [PATCH, RESEND] drm: exynos: avoid unused function warning
When CONFIG_PM is not set, we get a warning about an unused function: drivers/gpu/drm/exynos/exynos_drm_gsc.c:1219:12: error: 'gsc_clk_ctrl' defined but not used [-Werror=unused-function] static int gsc_clk_ctrl(struct gsc_context *ctx, bool enable) ^~~~~~~~~~~~ This removes the two #ifdef checks in this file and instead marks the functions as __maybe_unused, which is a more reliable way of doing the same, allowing better build coverage and avoiding the warning above. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Inki Dae <[email protected]>
1 parent b05984e commit 4158dbe

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/gpu/drm/exynos/exynos_drm_gsc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,8 +1760,7 @@ static int gsc_remove(struct platform_device *pdev)
17601760
return 0;
17611761
}
17621762

1763-
#ifdef CONFIG_PM
1764-
static int gsc_runtime_suspend(struct device *dev)
1763+
static int __maybe_unused gsc_runtime_suspend(struct device *dev)
17651764
{
17661765
struct gsc_context *ctx = get_gsc_context(dev);
17671766

@@ -1770,15 +1769,14 @@ static int gsc_runtime_suspend(struct device *dev)
17701769
return gsc_clk_ctrl(ctx, false);
17711770
}
17721771

1773-
static int gsc_runtime_resume(struct device *dev)
1772+
static int __maybe_unused gsc_runtime_resume(struct device *dev)
17741773
{
17751774
struct gsc_context *ctx = get_gsc_context(dev);
17761775

17771776
DRM_DEBUG_KMS("id[%d]\n", ctx->id);
17781777

17791778
return gsc_clk_ctrl(ctx, true);
17801779
}
1781-
#endif
17821780

17831781
static const struct dev_pm_ops gsc_pm_ops = {
17841782
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,

0 commit comments

Comments
 (0)