linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] drm/v3d: Remove set but not used variable
@ 2020-09-22 11:39 Li Heng
  2020-09-23 13:13 ` Dave Stevenson
  0 siblings, 1 reply; 3+ messages in thread
From: Li Heng @ 2020-09-22 11:39 UTC (permalink / raw)
  To: eric, airlied, daniel; +Cc: dri-devel, linux-kernel

This addresses the following gcc warning with "make W=1":

drivers/gpu/drm/v3d/v3d_drv.c:73:32: warning:
‘v3d_v3d_pm_ops’ defined but not used [-Wunused-const-variable=]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Li Heng <liheng40@huawei.com>
---
 drivers/gpu/drm/v3d/v3d_drv.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
index 9f7c261..05140db 100644
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -70,10 +70,6 @@ static int v3d_runtime_resume(struct device *dev)
 }
 #endif

-static const struct dev_pm_ops v3d_v3d_pm_ops = {
-	SET_RUNTIME_PM_OPS(v3d_runtime_suspend, v3d_runtime_resume, NULL)
-};
-
 static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
 			       struct drm_file *file_priv)
 {
--
2.7.4


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

* Re: [PATCH -next] drm/v3d: Remove set but not used variable
  2020-09-22 11:39 [PATCH -next] drm/v3d: Remove set but not used variable Li Heng
@ 2020-09-23 13:13 ` Dave Stevenson
  2020-09-23 17:27   ` Eric Anholt
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Stevenson @ 2020-09-23 13:13 UTC (permalink / raw)
  To: Li Heng; +Cc: Eric Anholt, airlied, daniel, LKML, DRI Development

Hi

On Wed, 23 Sep 2020 at 08:53, Li Heng <liheng40@huawei.com> wrote:
>
> This addresses the following gcc warning with "make W=1":
>
> drivers/gpu/drm/v3d/v3d_drv.c:73:32: warning:
> ‘v3d_v3d_pm_ops’ defined but not used [-Wunused-const-variable=]
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Li Heng <liheng40@huawei.com>
> ---
>  drivers/gpu/drm/v3d/v3d_drv.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
> index 9f7c261..05140db 100644
> --- a/drivers/gpu/drm/v3d/v3d_drv.c
> +++ b/drivers/gpu/drm/v3d/v3d_drv.c
> @@ -70,10 +70,6 @@ static int v3d_runtime_resume(struct device *dev)
>  }
>  #endif
>
> -static const struct dev_pm_ops v3d_v3d_pm_ops = {
> -       SET_RUNTIME_PM_OPS(v3d_runtime_suspend, v3d_runtime_resume, NULL)
> -};
> -

This looks to be the wrong approach, and I think a patch has got
dropped somewhere.

On our Raspberry Pi downstream vendor tree we have a patch [1] from
Eric that renames v3d_v3d_pm_ops to v3d_pm_ops (don't need the
duplicated suffix), and adds it to v3d_platform_driver. Why that never
made it through the mainline trees I don't know.

Eric: How good's your memory on this one?

Thanks
  Dave

[1] https://github.com/raspberrypi/linux/commit/fddfb26f6503835a3c6f7ca0175ce2260f60f67c

>  static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
>                                struct drm_file *file_priv)
>  {
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH -next] drm/v3d: Remove set but not used variable
  2020-09-23 13:13 ` Dave Stevenson
@ 2020-09-23 17:27   ` Eric Anholt
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Anholt @ 2020-09-23 17:27 UTC (permalink / raw)
  To: Dave Stevenson
  Cc: Li Heng, David Airlie, Daniel Vetter, LKML, DRI Development

On Wed, Sep 23, 2020 at 6:13 AM Dave Stevenson
<dave.stevenson@raspberrypi.com> wrote:
>
> Hi
>
> On Wed, 23 Sep 2020 at 08:53, Li Heng <liheng40@huawei.com> wrote:
> >
> > This addresses the following gcc warning with "make W=1":
> >
> > drivers/gpu/drm/v3d/v3d_drv.c:73:32: warning:
> > ‘v3d_v3d_pm_ops’ defined but not used [-Wunused-const-variable=]
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Li Heng <liheng40@huawei.com>
> > ---
> >  drivers/gpu/drm/v3d/v3d_drv.c | 4 ----
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
> > index 9f7c261..05140db 100644
> > --- a/drivers/gpu/drm/v3d/v3d_drv.c
> > +++ b/drivers/gpu/drm/v3d/v3d_drv.c
> > @@ -70,10 +70,6 @@ static int v3d_runtime_resume(struct device *dev)
> >  }
> >  #endif
> >
> > -static const struct dev_pm_ops v3d_v3d_pm_ops = {
> > -       SET_RUNTIME_PM_OPS(v3d_runtime_suspend, v3d_runtime_resume, NULL)
> > -};
> > -
>
> This looks to be the wrong approach, and I think a patch has got
> dropped somewhere.
>
> On our Raspberry Pi downstream vendor tree we have a patch [1] from
> Eric that renames v3d_v3d_pm_ops to v3d_pm_ops (don't need the
> duplicated suffix), and adds it to v3d_platform_driver. Why that never
> made it through the mainline trees I don't know.
>
> Eric: How good's your memory on this one?

The RPM stuff ended up abandoned because I didn't have any support in
debugging the power domain driver and I punted for a downstream hack.
We should at least be using these ops, though.

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

end of thread, other threads:[~2020-09-23 17:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 11:39 [PATCH -next] drm/v3d: Remove set but not used variable Li Heng
2020-09-23 13:13 ` Dave Stevenson
2020-09-23 17:27   ` Eric Anholt

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).