Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1299934
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/3] drm: arm-hdlcd: fix build warnings for !CONFIG_PM |
| Date | 2016-01-01 15:50 +0100 |
| Message-ID | <qM9bI-3FN-25@gated-at.bofh.it> (permalink) |
| References | <qM8z1-3sD-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The hdlcd_pm_suspend and hdlcd_pm_resume are intentionally unused
when CONFIG_PM is not set in this driver, and we get a compiler warning
for this:
drivers/gpu/drm/arm/hdlcd_drv.c:521:12: warning: 'hdlcd_pm_suspend' defined but not used [-Wunused-function]
drivers/gpu/drm/arm/hdlcd_drv.c:536:12: warning: 'hdlcd_pm_resume' defined but not used [-Wunused-function]
This adds a __maybe_unused annotation for the two functions, to let
the compiler know this is the intended behavior. This is better than
an #ifdef as it improves the compile time coverage of the code and it
looks nicer.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index 31969efe97d4..6173bb835223 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -518,7 +518,7 @@ static const struct of_device_id hdlcd_of_match[] = {
};
MODULE_DEVICE_TABLE(of, hdlcd_of_match);
-static int hdlcd_pm_suspend(struct device *dev)
+static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
{
struct drm_device *drm = dev_get_drvdata(dev);
struct drm_crtc *crtc;
@@ -533,7 +533,7 @@ static int hdlcd_pm_suspend(struct device *dev)
return 0;
}
-static int hdlcd_pm_resume(struct device *dev)
+static int __maybe_unused hdlcd_pm_resume(struct device *dev)
{
struct drm_device *drm = dev_get_drvdata(dev);
struct drm_crtc *crtc;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] drm: arm-hdlcd: remove DMA_CMA select Arnd Bergmann <arnd@arndb.de> - 2016-01-01 15:10 +0100
[PATCH 2/3] drm: arm-hdlcd: remove COMMON_CLK_SCPI select Arnd Bergmann <arnd@arndb.de> - 2016-01-01 15:50 +0100
Re: [PATCH 2/3] drm: arm-hdlcd: remove COMMON_CLK_SCPI select Thierry Reding <thierry.reding@gmail.com> - 2016-01-04 09:30 +0100
[PATCH 3/3] drm: arm-hdlcd: fix build warnings for !CONFIG_PM Arnd Bergmann <arnd@arndb.de> - 2016-01-01 15:50 +0100
Re: [PATCH 3/3] drm: arm-hdlcd: fix build warnings for !CONFIG_PM Thierry Reding <thierry.reding@gmail.com> - 2016-01-04 09:30 +0100
[PATCH 4/3] drm: arm-hdlcd: add explictit DRM dependency Arnd Bergmann <arnd@arndb.de> - 2016-01-01 23:10 +0100
Re: [PATCH 4/3] drm: arm-hdlcd: add explictit DRM dependency Thierry Reding <thierry.reding@gmail.com> - 2016-01-04 09:30 +0100
Re: [PATCH 4/3] drm: arm-hdlcd: add explictit DRM dependency Arnd Bergmann <arnd@arndb.de> - 2016-01-04 09:50 +0100
Re: [PATCH 4/3] drm: arm-hdlcd: add explictit DRM dependency Liviu Dudau <liviu.dudau@arm.com> - 2016-01-11 12:20 +0100
Re: [PATCH 4/3] drm: arm-hdlcd: add explictit DRM dependency Arnd Bergmann <arnd@arndb.de> - 2016-01-11 13:20 +0100
Re: [PATCH 4/3] drm: arm-hdlcd: add explictit DRM dependency Liviu Dudau <liviu.dudau@arm.com> - 2016-01-11 13:30 +0100
Re: [PATCH 4/3] drm: arm-hdlcd: add explictit DRM dependency Arnd Bergmann <arnd@arndb.de> - 2016-01-11 15:10 +0100
Re: [PATCH 4/3] drm: arm-hdlcd: add explictit DRM dependency Liviu Dudau <liviu.dudau@arm.com> - 2016-01-11 15:20 +0100
Re: [PATCH] drm: arm-hdlcd: remove DMA_CMA select Thierry Reding <thierry.reding@gmail.com> - 2016-01-04 09:30 +0100
Re: [PATCH] drm: arm-hdlcd: remove DMA_CMA select Liviu Dudau <liviu.dudau@arm.com> - 2016-01-11 11:40 +0100
csiph-web