Skip to contentSkip to conversation

drm/komeda: mark PM functions as __maybe_unused

PATCH In review Arnd Bergmann 2 participants 3 messages Jan 7, 2020 – Mar 6, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/komeda: mark PM functions as __maybe_unused

Without this, we get a couple of warnings when CONFIG_PM is disabled:

drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12: error: 'komeda_rt_pm_resume' defined but not used [-Werror=unused-function]
static int komeda_rt_pm_resume(struct device *dev)

            ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12: error: 'komeda_rt_pm_suspend' defined but not used [-Werror=unused-function]
 static int komeda_rt_pm_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~
Fixes efb465088518 ("drm/komeda: Add runtime_pm support")
---
 drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_drv.c +2 -2
index ea5cd1e17304..e7933930a657 100644
@@ -146,14 +146,14 @@ static const struct of_device_id komeda_of_match[] = {
 
 MODULE_DEVICE_TABLE(of, komeda_of_match);
 
-static int komeda_rt_pm_suspend(struct device *dev)
+static int __maybe_unused komeda_rt_pm_suspend(struct device *dev)
 {
 	struct komeda_drv *mdrv = dev_get_drvdata(dev);
 
 	return komeda_dev_suspend(mdrv->mdev);
 }
 
-static int komeda_rt_pm_resume(struct device *dev)
+static int __maybe_unused komeda_rt_pm_resume(struct device *dev)
 {
 	struct komeda_drv *mdrv = dev_get_drvdata(dev);
 
Signature · 6 lines
2.20.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 27 lines · Arnd Bergmann

Without this, we get a couple of warnings when CONFIG_PM is disabled:

drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12: error: 'komeda_rt_pm_resume' defined but not used [-Werror=unused-function]
static int komeda_rt_pm_resume(struct device *dev)

            ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12: error: 'komeda_rt_pm_suspend' defined but not used [-Werror=unused-function]
 static int komeda_rt_pm_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~
Fixes efb465088518 ("drm/komeda: Add runtime_pm support")
---
 drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_drv.c +1 -1
index ea5cd1e17304..e7933930a657 100644
@@ -146,14 +146,14 @@ static const struct of_device_id komeda_of_match[] = {
 
 MODULE_DEVICE_TABLE(of, komeda_of_match);
 
-static int komeda_rt_pm_suspend(struct device *dev)
+static int __maybe_unused komeda_rt_pm_suspend(struct device *dev)
 {

drivers/gpu/drm/arm/display/komeda/komeda_drv.c static const struct of_device_id komeda_of_match[] = { · line 159

Quoted 10 lines
drivers/gpu/drm/arm/display/komeda/komeda_drv.c +1 -1
 	struct komeda_drv *mdrv = dev_get_drvdata(dev);
 
 	return komeda_dev_suspend(mdrv->mdev);
 }
 
-static int komeda_rt_pm_resume(struct device *dev)
+static int __maybe_unused komeda_rt_pm_resume(struct device *dev)
 {
 	struct komeda_drv *mdrv = dev_get_drvdata(dev);
 

Hi Arnd:

Thank you for the patch.

James

Quoted 2 lines
Signature · 1 line
2.20.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to Arnd Bergmann
Quoted 28 lines · Arnd Bergmann

Without this, we get a couple of warnings when CONFIG_PM is disabled:

drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12: error: 'komeda_rt_pm_resume' defined but not used [-Werror=unused-function]
static int komeda_rt_pm_resume(struct device *dev)

            ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12: error: 'komeda_rt_pm_suspend' defined but not used [-Werror=unused-function]
 static int komeda_rt_pm_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~
Fixes efb465088518 ("drm/komeda: Add runtime_pm support")
---
 drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/arm/display/komeda/komeda_drv.c +1 -1
index ea5cd1e17304..e7933930a657 100644
@@ -146,14 +146,14 @@ static const struct of_device_id komeda_of_match[] = {
 
 MODULE_DEVICE_TABLE(of, komeda_of_match);
 
-static int komeda_rt_pm_suspend(struct device *dev)
+static int __maybe_unused komeda_rt_pm_suspend(struct device *dev)
 {

drivers/gpu/drm/arm/display/komeda/komeda_drv.c static const struct of_device_id komeda_of_match[] = { · line 159

Quoted 10 lines
drivers/gpu/drm/arm/display/komeda/komeda_drv.c +1 -1
 	struct komeda_drv *mdrv = dev_get_drvdata(dev);
 
 	return komeda_dev_suspend(mdrv->mdev);
 }
 
-static int komeda_rt_pm_resume(struct device *dev)
+static int __maybe_unused komeda_rt_pm_resume(struct device *dev)
 {
 	struct komeda_drv *mdrv = dev_get_drvdata(dev);
 

Applied to drm-misc-fixes 9803aac7b5508718989e4cde11b854fc01037b01
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel