Skip to contentSkip to conversation

drm/nouveau/svm: Remove set but not used variable 'ret'

PATCH In review Baokun Li 1 participant 2 messages May 31, 2021 – Jun 15, 2021

Subsystems (3)
lore
Share & tools
lore

Baokun Li

author
#0 lore raw

PATCH 1/1 drm/nouveau/svm: Remove set but not used variable 'ret'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/nouveau/nouveau_svm.c: In function 'nouveau_pfns_map':
drivers/gpu/drm/nouveau/nouveau_svm.c:814:6: warning:
variable ‘ret’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

---
 drivers/gpu/drm/nouveau/nouveau_svm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nouveau_svm.c +1 -2
index 84726a89e665..16fbf90f9f31 100644
@@ -921,7 +921,6 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm,
 		 unsigned long addr, u64 *pfns, unsigned long npages)
 {
 	struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns);
-	int ret;
 
 	args->p.addr = addr;
 	args->p.size = npages << PAGE_SHIFT;
@@ -929,7 +928,7 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm,
 	mutex_lock(&svmm->mutex);
 
 	svmm->vmm->vmm.object.client->super = true;
-	ret = nvif_object_ioctl(&svmm->vmm->vmm.object, args, sizeof(*args) +
+	nvif_object_ioctl(&svmm->vmm->vmm.object, args, sizeof(*args) +
 				npages * sizeof(args->p.phys[0]), NULL);
 	svmm->vmm->vmm.object.client->super = false;
 
Signature · 1 line
2.25.4
#1 lore raw

ping

Quoted 34 lines · Baokun Li

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/nouveau/nouveau_svm.c: In function 'nouveau_pfns_map':
drivers/gpu/drm/nouveau/nouveau_svm.c:814:6: warning:
variable ‘ret’ set but not used [-Wunused-but-set-variable]

It never used since introduction.

---
  drivers/gpu/drm/nouveau/nouveau_svm.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nouveau_svm.c +1 -2
index 84726a89e665..16fbf90f9f31 100644
@@ -921,7 +921,6 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm,
  		 unsigned long addr, u64 *pfns, unsigned long npages)
  {
  	struct nouveau_pfnmap_args *args = nouveau_pfns_to_args(pfns);
-	int ret;
 
  	args->p.addr = addr;
  	args->p.size = npages << PAGE_SHIFT;
@@ -929,7 +928,7 @@ nouveau_pfns_map(struct nouveau_svmm *svmm, struct mm_struct *mm,
  	mutex_lock(&svmm->mutex);
 
  	svmm->vmm->vmm.object.client->super = true;
-	ret = nvif_object_ioctl(&svmm->vmm->vmm.object, args, sizeof(*args) +
+	nvif_object_ioctl(&svmm->vmm->vmm.object, args, sizeof(*args) +
  				npages * sizeof(args->p.phys[0]), NULL);
  	svmm->vmm->vmm.object.client->super = false;