linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: komeda: Make rt_pm_ops dependent on CONFIG_PM
@ 2020-03-04 14:54 Vincenzo Frascino
  2020-03-05 18:42 ` Liviu Dudau
  0 siblings, 1 reply; 5+ messages in thread
From: Vincenzo Frascino @ 2020-03-04 14:54 UTC (permalink / raw)
  To: dri-devel, linux-kernel
  Cc: Vincenzo Frascino, James (Qian) Wang, Liviu Dudau,
	Mihail Atanassov, Brian Starkey, David Airlie, Daniel Vetter

komeda_rt_pm_suspend() and komeda_rt_pm_resume() are compiled only when
CONFIG_PM is enabled. Having it disabled triggers the following warning
at compile time:

linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12:
warning: ‘komeda_rt_pm_resume’ defined but not used [-Wunused-function]
 static int komeda_rt_pm_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~
linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12:
warning: ‘komeda_rt_pm_suspend’ defined but not used [-Wunused-function]
 static int komeda_rt_pm_suspend(struct device *dev)

Make komeda_rt_pm_suspend() and komeda_rt_pm_resume() dependent on
CONFIG_PM to address the issue.

Cc: "James (Qian) Wang" <james.qian.wang@arm.com>
Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Mihail Atanassov <mihail.atanassov@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
---
 drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
index ea5cd1e17304..dd3ae3d88687 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
@@ -146,6 +146,7 @@ static const struct of_device_id komeda_of_match[] = {
 
 MODULE_DEVICE_TABLE(of, komeda_of_match);
 
+#ifdef CONFIG_PM
 static int komeda_rt_pm_suspend(struct device *dev)
 {
 	struct komeda_drv *mdrv = dev_get_drvdata(dev);
@@ -159,6 +160,7 @@ static int komeda_rt_pm_resume(struct device *dev)
 
 	return komeda_dev_resume(mdrv->mdev);
 }
+#endif /* CONFIG_PM */
 
 static int __maybe_unused komeda_pm_suspend(struct device *dev)
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm: komeda: Make rt_pm_ops dependent on CONFIG_PM
  2020-03-04 14:54 [PATCH] drm: komeda: Make rt_pm_ops dependent on CONFIG_PM Vincenzo Frascino
@ 2020-03-05 18:42 ` Liviu Dudau
  2020-03-06  4:14   ` james qian wang (Arm Technology China)
  2020-03-06  9:52   ` Vincenzo Frascino
  0 siblings, 2 replies; 5+ messages in thread
From: Liviu Dudau @ 2020-03-05 18:42 UTC (permalink / raw)
  To: Vincenzo Frascino
  Cc: dri-devel, linux-kernel, James (Qian) Wang, Mihail Atanassov,
	Brian Starkey, David Airlie, Daniel Vetter

On Wed, Mar 04, 2020 at 02:54:12PM +0000, Vincenzo Frascino wrote:
> komeda_rt_pm_suspend() and komeda_rt_pm_resume() are compiled only when
> CONFIG_PM is enabled. Having it disabled triggers the following warning
> at compile time:
> 
> linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12:
> warning: ‘komeda_rt_pm_resume’ defined but not used [-Wunused-function]
>  static int komeda_rt_pm_resume(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~
> linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12:
> warning: ‘komeda_rt_pm_suspend’ defined but not used [-Wunused-function]
>  static int komeda_rt_pm_suspend(struct device *dev)
> 
> Make komeda_rt_pm_suspend() and komeda_rt_pm_resume() dependent on
> CONFIG_PM to address the issue.
> 
> Cc: "James (Qian) Wang" <james.qian.wang@arm.com>
> Cc: Liviu Dudau <liviu.dudau@arm.com>
> Cc: Mihail Atanassov <mihail.atanassov@arm.com>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Thanks for the patch, I will push it into drm-misc-fixes tomorrow.

Best regards,
Liviu

> ---
>  drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> index ea5cd1e17304..dd3ae3d88687 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> @@ -146,6 +146,7 @@ static const struct of_device_id komeda_of_match[] = {
>  
>  MODULE_DEVICE_TABLE(of, komeda_of_match);
>  
> +#ifdef CONFIG_PM
>  static int komeda_rt_pm_suspend(struct device *dev)
>  {
>  	struct komeda_drv *mdrv = dev_get_drvdata(dev);
> @@ -159,6 +160,7 @@ static int komeda_rt_pm_resume(struct device *dev)
>  
>  	return komeda_dev_resume(mdrv->mdev);
>  }
> +#endif /* CONFIG_PM */
>  
>  static int __maybe_unused komeda_pm_suspend(struct device *dev)
>  {
> -- 
> 2.25.1
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm: komeda: Make rt_pm_ops dependent on CONFIG_PM
  2020-03-05 18:42 ` Liviu Dudau
@ 2020-03-06  4:14   ` james qian wang (Arm Technology China)
  2020-03-06  9:51     ` Vincenzo Frascino
  2020-03-06  9:52   ` Vincenzo Frascino
  1 sibling, 1 reply; 5+ messages in thread
From: james qian wang (Arm Technology China) @ 2020-03-06  4:14 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: Vincenzo Frascino, dri-devel, linux-kernel, Mihail Atanassov,
	Brian Starkey, David Airlie, Daniel Vetter, nd

On Fri, Mar 06, 2020 at 02:42:55AM +0800, Liviu Dudau wrote:
> On Wed, Mar 04, 2020 at 02:54:12PM +0000, Vincenzo Frascino wrote:
> > komeda_rt_pm_suspend() and komeda_rt_pm_resume() are compiled only when
> > CONFIG_PM is enabled. Having it disabled triggers the following warning
> > at compile time:
> > 
> > linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12:
> > warning: ‘komeda_rt_pm_resume’ defined but not used [-Wunused-function]
> >  static int komeda_rt_pm_resume(struct device *dev)
> >             ^~~~~~~~~~~~~~~~~~~
> > linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12:
> > warning: ‘komeda_rt_pm_suspend’ defined but not used [-Wunused-function]
> >  static int komeda_rt_pm_suspend(struct device *dev)
> > 
> > Make komeda_rt_pm_suspend() and komeda_rt_pm_resume() dependent on
> > CONFIG_PM to address the issue.
> > 
> > Cc: "James (Qian) Wang" <james.qian.wang@arm.com>
> > Cc: Liviu Dudau <liviu.dudau@arm.com>
> > Cc: Mihail Atanassov <mihail.atanassov@arm.com>
> > Cc: Brian Starkey <brian.starkey@arm.com>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>

Hi Vincenzo:

Thanks for the patch.

and Vincenzo & Liviu, sorry

Since there is a patch for this problem already:
https://patchwork.freedesktop.org/series/71721/

And I have pushed that old fix to drm-misc-fixes just before I saw
this mail. sorry.

> Acked-by: Liviu Dudau <liviu.dudau@arm.com>
> 
> Thanks for the patch, I will push it into drm-misc-fixes tomorrow.
> 
> Best regards,
> Liviu
> 
> > ---
> >  drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> > index ea5cd1e17304..dd3ae3d88687 100644
> > --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
> > @@ -146,6 +146,7 @@ static const struct of_device_id komeda_of_match[] = {
> >  
> >  MODULE_DEVICE_TABLE(of, komeda_of_match);
> >  
> > +#ifdef CONFIG_PM
> >  static int komeda_rt_pm_suspend(struct device *dev)
> >  {
> >  	struct komeda_drv *mdrv = dev_get_drvdata(dev);
> > @@ -159,6 +160,7 @@ static int komeda_rt_pm_resume(struct device *dev)
> >  
> >  	return komeda_dev_resume(mdrv->mdev);
> >  }
> > +#endif /* CONFIG_PM */
> >  
> >  static int __maybe_unused komeda_pm_suspend(struct device *dev)
> >  {
> > -- 
> > 2.25.1
> > 
> 
> -- 
> ====================
> | I would like to |
> | fix the world,  |
> | but they're not |
> | giving me the   |
>  \ source code!  /
>   ---------------
>     ¯\_(ツ)_/¯

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm: komeda: Make rt_pm_ops dependent on CONFIG_PM
  2020-03-06  4:14   ` james qian wang (Arm Technology China)
@ 2020-03-06  9:51     ` Vincenzo Frascino
  0 siblings, 0 replies; 5+ messages in thread
From: Vincenzo Frascino @ 2020-03-06  9:51 UTC (permalink / raw)
  To: james qian wang (Arm Technology China), Liviu Dudau
  Cc: dri-devel, linux-kernel, Mihail Atanassov, Brian Starkey,
	David Airlie, Daniel Vetter, nd

Hi James,

On 3/6/20 4:14 AM, james qian wang (Arm Technology China) wrote:
> On Fri, Mar 06, 2020 at 02:42:55AM +0800, Liviu Dudau wrote:
>> On Wed, Mar 04, 2020 at 02:54:12PM +0000, Vincenzo Frascino wrote:
>>> komeda_rt_pm_suspend() and komeda_rt_pm_resume() are compiled only when
>>> CONFIG_PM is enabled. Having it disabled triggers the following warning
>>> at compile time:
>>>
>>> linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12:
>>> warning: ‘komeda_rt_pm_resume’ defined but not used [-Wunused-function]
>>>  static int komeda_rt_pm_resume(struct device *dev)
>>>             ^~~~~~~~~~~~~~~~~~~
>>> linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12:
>>> warning: ‘komeda_rt_pm_suspend’ defined but not used [-Wunused-function]
>>>  static int komeda_rt_pm_suspend(struct device *dev)
>>>
>>> Make komeda_rt_pm_suspend() and komeda_rt_pm_resume() dependent on
>>> CONFIG_PM to address the issue.
>>>
>>> Cc: "James (Qian) Wang" <james.qian.wang@arm.com>
>>> Cc: Liviu Dudau <liviu.dudau@arm.com>
>>> Cc: Mihail Atanassov <mihail.atanassov@arm.com>
>>> Cc: Brian Starkey <brian.starkey@arm.com>
>>> Cc: David Airlie <airlied@linux.ie>
>>> Cc: Daniel Vetter <daniel@ffwll.ch>
>>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
>>
> 
> Hi Vincenzo:
> 
> Thanks for the patch.
> 
> and Vincenzo & Liviu, sorry
> 
> Since there is a patch for this problem already:
> https://patchwork.freedesktop.org/series/71721/
> 
> And I have pushed that old fix to drm-misc-fixes just before I saw
> this mail. sorry.
> 

No issue, as far as it is fixed :) It is annoying stepping on it during
randconfig :)

Thanks for letting me know!

[...]

-- 
Regards,
Vincenzo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm: komeda: Make rt_pm_ops dependent on CONFIG_PM
  2020-03-05 18:42 ` Liviu Dudau
  2020-03-06  4:14   ` james qian wang (Arm Technology China)
@ 2020-03-06  9:52   ` Vincenzo Frascino
  1 sibling, 0 replies; 5+ messages in thread
From: Vincenzo Frascino @ 2020-03-06  9:52 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: dri-devel, linux-kernel, James (Qian) Wang, Mihail Atanassov,
	Brian Starkey, David Airlie, Daniel Vetter

Hi Liviu,

On 3/5/20 6:42 PM, Liviu Dudau wrote:
> On Wed, Mar 04, 2020 at 02:54:12PM +0000, Vincenzo Frascino wrote:
>> komeda_rt_pm_suspend() and komeda_rt_pm_resume() are compiled only when
>> CONFIG_PM is enabled. Having it disabled triggers the following warning
>> at compile time:
>>
>> linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12:
>> warning: ‘komeda_rt_pm_resume’ defined but not used [-Wunused-function]
>>  static int komeda_rt_pm_resume(struct device *dev)
>>             ^~~~~~~~~~~~~~~~~~~
>> linux/drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12:
>> warning: ‘komeda_rt_pm_suspend’ defined but not used [-Wunused-function]
>>  static int komeda_rt_pm_suspend(struct device *dev)
>>
>> Make komeda_rt_pm_suspend() and komeda_rt_pm_resume() dependent on
>> CONFIG_PM to address the issue.
>>
>> Cc: "James (Qian) Wang" <james.qian.wang@arm.com>
>> Cc: Liviu Dudau <liviu.dudau@arm.com>
>> Cc: Mihail Atanassov <mihail.atanassov@arm.com>
>> Cc: Brian Starkey <brian.starkey@arm.com>
>> Cc: David Airlie <airlied@linux.ie>
>> Cc: Daniel Vetter <daniel@ffwll.ch>
>> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> 
> Acked-by: Liviu Dudau <liviu.dudau@arm.com>
> 
> Thanks for the patch, I will push it into drm-misc-fixes tomorrow.
> 

Thank you!

> Best regards,
> Liviu
> 
>> ---
>>  drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
>> index ea5cd1e17304..dd3ae3d88687 100644
>> --- a/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
>> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_drv.c
>> @@ -146,6 +146,7 @@ static const struct of_device_id komeda_of_match[] = {
>>  
>>  MODULE_DEVICE_TABLE(of, komeda_of_match);
>>  
>> +#ifdef CONFIG_PM
>>  static int komeda_rt_pm_suspend(struct device *dev)
>>  {
>>  	struct komeda_drv *mdrv = dev_get_drvdata(dev);
>> @@ -159,6 +160,7 @@ static int komeda_rt_pm_resume(struct device *dev)
>>  
>>  	return komeda_dev_resume(mdrv->mdev);
>>  }
>> +#endif /* CONFIG_PM */
>>  
>>  static int __maybe_unused komeda_pm_suspend(struct device *dev)
>>  {
>> -- 
>> 2.25.1
>>
> 

-- 
Regards,
Vincenzo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-06  9:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 14:54 [PATCH] drm: komeda: Make rt_pm_ops dependent on CONFIG_PM Vincenzo Frascino
2020-03-05 18:42 ` Liviu Dudau
2020-03-06  4:14   ` james qian wang (Arm Technology China)
2020-03-06  9:51     ` Vincenzo Frascino
2020-03-06  9:52   ` Vincenzo Frascino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).