YueHaibing
2020-Jan-10 07:28 UTC
[Nouveau] [PATCH -next] drm/ttm: Remove set but not used variable 'mem'
drivers/gpu/drm/nouveau/nouveau_ttm.c: In function nouveau_vram_manager_new: drivers/gpu/drm/nouveau/nouveau_ttm.c:66:22: warning: variable mem set but not used [-Wunused-but-set-variable] drivers/gpu/drm/nouveau/nouveau_ttm.c: In function nouveau_gart_manager_new: drivers/gpu/drm/nouveau/nouveau_ttm.c:106:22: warning: variable mem set but not used [-Wunused-but-set-variable] They are not used any more, so remove it. Reported-by: Hulk Robot <hulkci at huawei.com> Signed-off-by: YueHaibing <yuehaibing at huawei.com> --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 77a0c6a..7ca0a24 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -63,14 +63,12 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man, { struct nouveau_bo *nvbo = nouveau_bo(bo); struct nouveau_drm *drm = nouveau_bdev(bo->bdev); - struct nouveau_mem *mem; int ret; if (drm->client.device.info.ram_size == 0) return -ENOMEM; ret = nouveau_mem_new(&drm->master, nvbo->kind, nvbo->comp, reg); - mem = nouveau_mem(reg); if (ret) return ret; @@ -103,11 +101,9 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man, { struct nouveau_bo *nvbo = nouveau_bo(bo); struct nouveau_drm *drm = nouveau_bdev(bo->bdev); - struct nouveau_mem *mem; int ret; ret = nouveau_mem_new(&drm->master, nvbo->kind, nvbo->comp, reg); - mem = nouveau_mem(reg); if (ret) return ret; -- 2.7.4
Ben Skeggs
2020-Jan-13 00:07 UTC
[Nouveau] [PATCH -next] drm/ttm: Remove set but not used variable 'mem'
On Fri, 10 Jan 2020 at 17:32, YueHaibing <yuehaibing at huawei.com> wrote:> > drivers/gpu/drm/nouveau/nouveau_ttm.c: In function nouveau_vram_manager_new: > drivers/gpu/drm/nouveau/nouveau_ttm.c:66:22: warning: variable mem set but not used [-Wunused-but-set-variable] > drivers/gpu/drm/nouveau/nouveau_ttm.c: In function nouveau_gart_manager_new: > drivers/gpu/drm/nouveau/nouveau_ttm.c:106:22: warning: variable mem set but not used [-Wunused-but-set-variable] > > They are not used any more, so remove it.Thanks!> > Reported-by: Hulk Robot <hulkci at huawei.com> > Signed-off-by: YueHaibing <yuehaibing at huawei.com> > --- > drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c > index 77a0c6a..7ca0a24 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c > +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c > @@ -63,14 +63,12 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man, > { > struct nouveau_bo *nvbo = nouveau_bo(bo); > struct nouveau_drm *drm = nouveau_bdev(bo->bdev); > - struct nouveau_mem *mem; > int ret; > > if (drm->client.device.info.ram_size == 0) > return -ENOMEM; > > ret = nouveau_mem_new(&drm->master, nvbo->kind, nvbo->comp, reg); > - mem = nouveau_mem(reg); > if (ret) > return ret; > > @@ -103,11 +101,9 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man, > { > struct nouveau_bo *nvbo = nouveau_bo(bo); > struct nouveau_drm *drm = nouveau_bdev(bo->bdev); > - struct nouveau_mem *mem; > int ret; > > ret = nouveau_mem_new(&drm->master, nvbo->kind, nvbo->comp, reg); > - mem = nouveau_mem(reg); > if (ret) > return ret; > > -- > 2.7.4 > > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau
Seemingly Similar Threads
- [PATCH 0/2] drm/nouveau: remove some set but not used variables
- [PATCH AUTOSEL 5.5 358/542] drm/nouveau/drm/ttm: Remove set but not used variable 'mem'
- [PATCH AUTOSEL 5.4 312/459] drm/nouveau/drm/ttm: Remove set but not used variable 'mem'
- [PATCH AUTOSEL 4.19 171/252] drm/nouveau/drm/ttm: Remove set but not used variable 'mem'
- [PATCH 2/2] drm/nouveau: remove set but not used variable 'mem'