diff mbox series

drm/komeda: mark PM functions as __maybe_unused

Message ID 20200107215327.1579195-1-arnd@arndb.de
State Accepted
Commit 9803aac7b5508718989e4cde11b854fc01037b01
Headers show
Series drm/komeda: mark PM functions as __maybe_unused | expand

Commit Message

Arnd Bergmann Jan. 7, 2020, 9:53 p.m. UTC
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.20.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Comments

james qian wang (Arm Technology China) Jan. 8, 2020, 9:56 a.m. UTC | #1
On Tue, Jan 07, 2020 at 10:53:19PM +0100, Arnd Bergmann wrote:
> 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")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> ---

>  drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c

> index ea5cd1e17304..e7933930a657 100644

> --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c

> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c

> @@ -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);

>


Hi Arnd:

Thank you for the patch.

Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>


James
> -- 

> 2.20.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
james qian wang (Arm Technology China) March 6, 2020, 3:59 a.m. UTC | #2
On Tue, Jan 07, 2020 at 10:53:19PM +0100, Arnd Bergmann wrote:
> 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")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>

> ---

>  drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c

> index ea5cd1e17304..e7933930a657 100644

> --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c

> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c

> @@ -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);

>


Applied to drm-misc-fixes 9803aac7b5508718989e4cde11b854fc01037b01
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
index ea5cd1e17304..e7933930a657 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
@@ -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);