Skip to contentSkip to conversation

drm/nouveau: fix duplicate pointer to struct drm_device

PATCH New Danilo Krummrich 1 participant 1 message Apr 15, 2024

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

PATCH 1/1 drm/nouveau: fix duplicate pointer to struct drm_device

nouveau_uvmm_ioctl_vm_init() already has a pointer to struct drm_device, no need to derive another one from struct drm_file.

Fixes 266f7618e761 ("drm/nouveau: separately allocate struct nouveau_uvmm")
---
 drivers/gpu/drm/nouveau/nouveau_uvmm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nouveau_uvmm.c +1 -2
index 0a0a11dc9ec0..929afd5bc773 100644
@@ -1812,13 +1812,12 @@ static const struct drm_gpuvm_ops gpuvm_ops = {
 };
 
 int
-nouveau_uvmm_ioctl_vm_init(struct drm_device *dev,
+nouveau_uvmm_ioctl_vm_init(struct drm_device *drm,
 			   void *data,
 			   struct drm_file *file_priv)
 {
 	struct nouveau_uvmm *uvmm;
 	struct nouveau_cli *cli = nouveau_cli(file_priv);
-	struct drm_device *drm = cli->drm->dev;
 	struct drm_gem_object *r_obj;
 	struct drm_nouveau_vm_init *init = data;
 	u64 kernel_managed_end;

base-commit: a57e191ebbaa0363dbf352cc37447c2230573e29
prerequisite-patch-id: 2d453c82161ab6a188caae12e558e8c8d6c1a450

Signature · 1 line
2.44.0