2021-04-01 09:08:07

by Jiapeng Chong

[permalink] [raw]
Subject: [PATCH] drm/nouveau: remove unused code

Fix the following whitescan warning:

drivers/gpu/drm/nouveau/nouveau_bo.c:1287:17: warning: variable ‘dev’
set but not used [-Wunused-but-set-variable].

Reported-by: Abaci Robot <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
---
drivers/gpu/drm/nouveau/nouveau_bo.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index f2720a0..b661d0d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1284,14 +1284,12 @@ vm_fault_t nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo)
struct ttm_tt *ttm)
{
struct nouveau_drm *drm;
- struct device *dev;
bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);

if (slave)
return;

drm = nouveau_bdev(bdev);
- dev = drm->dev->dev;

return ttm_pool_free(&drm->ttm.bdev.pool, ttm);
}
--
1.8.3.1