[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200827130047.429089-1-yanaijie@huawei.com>
Date: Thu, 27 Aug 2020 21:00:47 +0800
From: Jason Yan <yanaijie@...wei.com>
To: <bskeggs@...hat.com>, <airlied@...ux.ie>, <daniel@...ll.ch>,
<jgg@...pe.ca>, <dri-devel@...ts.freedesktop.org>,
<nouveau@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
CC: Jason Yan <yanaijie@...wei.com>, Hulk Robot <hulkci@...wei.com>
Subject: [PATCH] drm/nouveau/svm: remove set but not used 'ret'
This addresses the following gcc warning with "make W=1":
drivers/gpu/drm/nouveau/nouveau_svm.c: In function ‘nouveau_pfns_map’:
drivers/gpu/drm/nouveau/nouveau_svm.c:818:6: warning: variable ‘ret’ set
but not used [-Wunused-but-set-variable]
818 | int ret;
| ^~~
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Jason Yan <yanaijie@...wei.com>
---
drivers/gpu/drm/nouveau/nouveau_svm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c
index 2df1c0460559..7c95ffcbd18f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_svm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_svm.c
@@ -815,7 +815,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;
@@ -823,8 +822,8 @@ 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) +
- npages * sizeof(args->p.phys[0]), NULL);
+ nvif_object_ioctl(&svmm->vmm->vmm.object, args, sizeof(*args) +
+ npages * sizeof(args->p.phys[0]), NULL);
svmm->vmm->vmm.object.client->super = false;
mutex_unlock(&svmm->mutex);
--
2.25.4
Powered by blists - more mailing lists