Skip to contentSkip to conversation

drm/nouveau/disp: Use dev->dev to get the device

PATCH Applied Sakari Ailus 3 participants 5 messages Apr 9, 2025 – Jun 25, 2025

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

PATCH 1/1 drm/nouveau/disp: Use dev->dev to get the device

The local variable dev points to drm->dev already, use dev directly.

---
Hi folks,

The background is that I'll be using a Coccinelle spatch soon to remove (most) pm_runtime_mark_last_busy() calls. That won't work if the arguments aren't the same.

- Sakari

 drivers/gpu/drm/nouveau/nouveau_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_display.c +1 -1
index add006fc8d81..c50ec347b30a 100644
@@ -495,7 +495,7 @@ nouveau_display_hpd_work(struct work_struct *work)
 	if (first_changed_connector)
 		drm_connector_put(first_changed_connector);
 
-	pm_runtime_mark_last_busy(drm->dev->dev);
+	pm_runtime_mark_last_busy(dev->dev);
 noop:
 	pm_runtime_put_autosuspend(dev->dev);
 }
Signature · 1 line
2.39.5
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Sakari Ailus

The local variable dev points to drm->dev already, use dev directly.

---
Hi folks,

The background is that I'll be using a Coccinelle spatch soon to remove (most) pm_runtime_mark_last_busy() calls. That won't work if the arguments aren't the same.

If you want to submit / merge it together with your rework:

If I should pick it up, please let me know.

#2 lore raw

Hi Danilo,

Quoted 11 lines · Danilo Krummrich
Quoted 9 lines · Sakari Ailus

The local variable dev points to drm->dev already, use dev directly.

---
Hi folks,

The background is that I'll be using a Coccinelle spatch soon to remove (most) pm_runtime_mark_last_busy() calls. That won't work if the arguments aren't the same.

Quoted 5 lines

If you want to submit / merge it together with your rework:

If I should pick it up, please let me know.

Either is definitely possible. However I'd prefer you to take this in order to avoid potential conflicts with merging larger patches later on.

Thanks.

Signature · 3 lines
Kind regards,

Sakari Ailus