From: Arnd Bergmann Date: Tue, 10 Dec 2019 20:42:58 +0000 (+0100) Subject: drm/tegra: sor: Mark PM functions as __maybe_unused X-Git-Tag: v5.10.7~3266^2~2^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f90965abc51d9a72cd6fa414e9480edff9ddaced;p=platform%2Fkernel%2Flinux-rpi.git drm/tegra: sor: Mark PM functions as __maybe_unused Without CONFIG_PM, some functions cause harmless warnings: drivers/gpu/drm/tegra/sor.c:3984:12: error: 'tegra_sor_resume' defined but not used [-Werror=unused-function] static int tegra_sor_resume(struct device *dev) ^~~~~~~~~~~~~~~~ drivers/gpu/drm/tegra/sor.c:3970:12: error: 'tegra_sor_suspend' defined but not used [-Werror=unused-function] static int tegra_sor_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~ Mark these as __maybe_unused so the compiler can drop them silently. Signed-off-by: Arnd Bergmann Signed-off-by: Thierry Reding --- diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 200d99e..4885f7d 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -3990,7 +3990,7 @@ static int tegra_sor_remove(struct platform_device *pdev) return 0; } -static int tegra_sor_suspend(struct device *dev) +static int __maybe_unused tegra_sor_suspend(struct device *dev) { struct tegra_sor *sor = dev_get_drvdata(dev); int err; @@ -4005,7 +4005,7 @@ static int tegra_sor_suspend(struct device *dev) return 0; } -static int tegra_sor_resume(struct device *dev) +static int __maybe_unused tegra_sor_resume(struct device *dev) { struct tegra_sor *sor = dev_get_drvdata(dev); int err;