public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* nouveau: remove pointless assignment
@ 2013-09-17 21:26 Dave Jones
  2013-09-19  1:10 ` Ben Skeggs
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Jones @ 2013-09-17 21:26 UTC (permalink / raw)
  To: Linux Kernel; +Cc: bskeggs, airlied

self-assignment of a variable doesn't make a lot of sense.

Signed-off-by: Dave Jones <davej@fedoraproject.org>

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 755c38d..d0a737c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -982,7 +982,7 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr,
 		     bool no_wait_gpu, struct ttm_mem_reg *new_mem)
 {
 	struct nouveau_drm *drm = nouveau_bdev(bo->bdev);
-	struct nouveau_channel *chan = chan = drm->ttm.chan;
+	struct nouveau_channel *chan = drm->ttm.chan;
 	struct nouveau_bo *nvbo = nouveau_bo(bo);
 	struct ttm_mem_reg *old_mem = &bo->mem;
 	int ret;

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* nouveau: remove pointless assignment.
@ 2013-07-25 17:35 Dave Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Jones @ 2013-07-25 17:35 UTC (permalink / raw)
  To: Linux Kernel; +Cc: bskeggs

Assigning a pointer to itself and then overwriting it seems unnecessary.

Signed-off-by: Dave Jones <davej@redhat.com>

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 4e7ee5f..9b2c939 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -977,7 +977,7 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr,
 		     bool no_wait_gpu, struct ttm_mem_reg *new_mem)
 {
 	struct nouveau_drm *drm = nouveau_bdev(bo->bdev);
-	struct nouveau_channel *chan = chan = drm->ttm.chan;
+	struct nouveau_channel *chan = drm->ttm.chan;
 	struct nouveau_bo *nvbo = nouveau_bo(bo);
 	struct ttm_mem_reg *old_mem = &bo->mem;
 	int ret;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-19  1:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 21:26 nouveau: remove pointless assignment Dave Jones
2013-09-19  1:10 ` Ben Skeggs
  -- strict thread matches above, loose matches on Subject: below --
2013-07-25 17:35 Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox