[Nouveau] [PATCH] drm/nouveau/bo: remove duplicated variable initialization

Sergi Granell
Sat, 23 Sep 2017 22:39:44 -0000

The page_count variable in nv04_bo_move_m2mf was
redundantly initialized twice with the same value.

Signed-off-by: Sergi Granell <xerpi.g.12 at gmail.com>
---
 drivers/gpu/drm/nouveau/nouveau_bo.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c
b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 548f36d3..2724907a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -967,7 +967,6 @@ nv04_bo_move_m2mf(struct nouveau_channel *chan, struct
ttm_buffer_object *bo,
 	OUT_RING  (chan, nouveau_bo_mem_ctxdma(bo, chan, old_reg));
 	OUT_RING  (chan, nouveau_bo_mem_ctxdma(bo, chan, new_reg));

-	page_count = new_reg->num_pages;
 	while (page_count) {
 		int line_count = (page_count > 2047) ? 2047 : page_count;

--
2.14.1