[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aff157a6-d301-fe4f-d25c-f4ea0705f5a1@huawei.com>
Date: Tue, 15 Jun 2021 10:00:12 +0800
From: "libaokun (A)" <libaokun1@...wei.com>
To: <bskeggs@...hat.com>, <airlied@...ux.ie>, <daniel@...ll.ch>,
<dri-devel@...ts.freedesktop.org>, <nouveau@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>
CC: <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>,
<yangjihong1@...wei.com>, <yukuai3@...wei.com>
Subject: Re: [PATCH -next] drm/nouveau/svm: Remove set but not used variable
'ret'
ping
在 2021/5/31 10:38, 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.
>
> Signed-off-by: Baokun Li <libaokun1@...wei.com>
> ---
> drivers/gpu/drm/nouveau/nouveau_svm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_svm.c b/drivers/gpu/drm/nouveau/nouveau_svm.c
> index 84726a89e665..16fbf90f9f31 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_svm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_svm.c
> @@ -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;
>
Powered by blists - more mailing lists