Skip to contentSkip to conversation

drm/v3d: Remove set but not used variable

PATCH Superseded Li Heng 3 participants 3 messages Sep 22, 2020 – Sep 23, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Li Heng

author
#0 lore raw

PATCH 1/1 drm/v3d: Remove set but not used variable

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=]

---
 drivers/gpu/drm/v3d/v3d_drv.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/v3d/v3d_drv.c +0 -4
index 9f7c261..05140db 100644
@@ -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

#1 lore raw

Hi

Quoted 17 lines · Li Heng

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=]

---
 drivers/gpu/drm/v3d/v3d_drv.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/v3d/v3d_drv.c +0 -0
index 9f7c261..05140db 100644

drivers/gpu/drm/v3d/v3d_drv.c static int v3d_runtime_resume(struct device *dev) · line 76

Quoted 7 lines
drivers/gpu/drm/v3d/v3d_drv.c +0 -4
@@ -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

Quoted 10 lines
drivers/gpu/drm/v3d/v3d_drv.c +0 -1
 static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
                               struct drm_file *file_priv)
 {
--

2.7.4

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

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

#2 lore raw
Quoted 32 lines · Dave Stevenson

Hi

Quoted 17 lines · Li Heng

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=]

---
 drivers/gpu/drm/v3d/v3d_drv.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/v3d/v3d_drv.c +0 -0
index 9f7c261..05140db 100644

drivers/gpu/drm/v3d/v3d_drv.c static int v3d_runtime_resume(struct device *dev) · line 76

Quoted 7 lines
drivers/gpu/drm/v3d/v3d_drv.c +0 -4
@@ -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.

Quoted 6 lines

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.