drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
Subsystems (3)
PATCH 1/1 drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
commit d60326ac977a5e99047b44f9b313ff79cd3a14b4
Author: Austin Yuan <[email protected]> Date: Tue Jan 19 11:45:24 2010 +0800
drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
(quoted diff) +0 -0
b/drivers/gpu/drm/ttm/ttm_bo_util.c
index ceae52f..a6fca9e 100644
drivers/gpu/drm/ttm/ttm_bo_util.c +2 -5
@@ -77,7 +77,7 @@ int ttm_bo_move_ttm(struct ttm_buffer_object *bo, *old_mem = *new_mem; new_mem->mm_node =NULL ; -ttm_flag_masked (&save_flags, new_mem->placement,TTM_PL_MASK_MEMTYPE ); +return 0 ; }EXPORT_SYMBOL (ttm_bo_move_ttm);
@@ -219,7 +219,6 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,void *old_iomap;void *new_iomap;int ret; -uint32_t save_flags = old_mem->placement;unsigned long i;unsigned long page;unsigned long add =0 ;
@@ -270,7 +269,6 @@ out2: *old_mem = *new_mem; new_mem->mm_node =NULL ; -ttm_flag_masked (&save_flags, new_mem->placement,TTM_PL_MASK_MEMTYPE );if ((man->flags &TTM_MEMTYPE_FLAG_FIXED ) && (ttm !=NULL )) {ttm_tt_unbind (ttm);
@@ -537,7 +535,6 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type];struct ttm_mem_reg *old_mem = &bo->mem;int ret; -uint32_t save_flags = old_mem->placement;struct ttm_buffer_object *ghost_obj;void *tmp_obj =NULL ;
@@ -598,7 +595,7 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, *old_mem = *new_mem; new_mem->mm_node =NULL ; -ttm_flag_masked (&save_flags, new_mem->placement,TTM_PL_MASK_MEMTYPE ); +return 0 ; }EXPORT_SYMBOL (ttm_bo_move_accel_cleanup);
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
--
Yuan,
This looks like an old leftover from a previous cleanup.
Although, when I look at the code, it seems save_flags should be removed completely.
Can you take a look at that and respin the patch?
Thanks,
Thomas
Quoted 59 lines · Shengquan
commit
d60326ac977a5e99047b44f9b313ff79cd3a14b4Author: Austin Yuan <[email protected]> Date: Tue Jan 19 11:45:24 2010 +0800drm/ttm: remove unnecessary
save_flagsandttm_flag_maskedinttm_bo_util.cSigned-off-by Austin Yuan <[email protected]>drivers/gpu/drm/ttm/ttm_bo_util.c +2
-6@@ -77,7 +77,7 @@ int ttm_bo_move_ttm(struct ttm_buffer_object *bo, *old_mem = *new_mem; new_mem->mm_node =NULL ; -ttm_flag_masked (&save_flags, new_mem->placement,TTM_PL_MASK_MEMTYPE ); +return 0 ; }EXPORT_SYMBOL (ttm_bo_move_ttm);@@ -219,7 +219,6 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,void *old_iomap;void *new_iomap;int ret; -uint32_t save_flags = old_mem->placement;unsigned long i;unsigned long page;unsigned long add =0 ;@@ -270,7 +269,6 @@ out2: *old_mem = *new_mem; new_mem->mm_node =NULL ; -ttm_flag_masked (&save_flags, new_mem->placement,TTM_PL_MASK_MEMTYPE );if ((man->flags &TTM_MEMTYPE_FLAG_FIXED ) && (ttm !=NULL )) {ttm_tt_unbind (ttm);@@ -537,7 +535,6 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type];struct ttm_mem_reg *old_mem = &bo->mem;int ret; -uint32_t save_flags = old_mem->placement;struct ttm_buffer_object *ghost_obj;void *tmp_obj =NULL ;@@ -598,7 +595,7 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, *old_mem = *new_mem; new_mem->mm_node =NULL ; -ttm_flag_masked (&save_flags, new_mem->placement,TTM_PL_MASK_MEMTYPE ); +return 0 ; }EXPORT_SYMBOL (ttm_bo_move_accel_cleanup); ------------------------------------------------------------------------------Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference
Quoted 9 lines
attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
--
Quoted 6 lines · Thomas Hellstrom
Yuan,
This looks like an old leftover from a previous cleanup.Although, when I look at the code, it seems
save_flagsshould be removed completely.
Can you take a look at that and respin the patch?
Yes. One declaration wasn't removed. The new patch is attached.
Quoted 4 lines
Thanks,
Thomas
From 28b1013a21e54db062e2b79112bdbefcb99f8297 Mon Sep 17 00:00:00 2001
From: Austin Yuan <[email protected]>
Date: Thu, 21 Jan 2010 13:45:40 +0800
Subject: [PATCH] drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
--- drivers/gpu/drm/ttm/ttm_bo_util.c | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/ttm/ttm_bo_util.c +2 -7
@@ -53,7 +53,6 @@ int ttm_bo_move_ttm(struct ttm_buffer_object *bo, {struct ttm_tt *ttm = bo->ttm;struct ttm_mem_reg *old_mem = &bo->mem; -uint32_t save_flags = old_mem->placement;int ret;if (old_mem->mem_type !=TTM_PL_SYSTEM ) {
@@ -62,7 +61,6 @@ int ttm_bo_move_ttm(struct ttm_buffer_object *bo,ttm_flag_masked (&old_mem->placement,TTM_PL_FLAG_SYSTEM ,TTM_PL_MASK_MEM ); old_mem->mem_type =TTM_PL_SYSTEM ; - save_flags = old_mem->placement; } ret =ttm_tt_set_placement_caching (ttm, new_mem->placement);
@@ -77,7 +75,7 @@ int ttm_bo_move_ttm(struct ttm_buffer_object *bo, *old_mem = *new_mem; new_mem->mm_node =NULL ; -ttm_flag_masked (&save_flags, new_mem->placement,TTM_PL_MASK_MEMTYPE ); +return 0 ; }EXPORT_SYMBOL (ttm_bo_move_ttm);
@@ -219,7 +217,6 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,void *old_iomap;void *new_iomap;int ret; -uint32_t save_flags = old_mem->placement;unsigned long i;unsigned long page;unsigned long add =0 ;
@@ -270,7 +267,6 @@ out2: *old_mem = *new_mem; new_mem->mm_node =NULL ; -ttm_flag_masked (&save_flags, new_mem->placement,TTM_PL_MASK_MEMTYPE );if ((man->flags &TTM_MEMTYPE_FLAG_FIXED ) && (ttm !=NULL )) {ttm_tt_unbind (ttm);
@@ -537,7 +533,6 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type];struct ttm_mem_reg *old_mem = &bo->mem;int ret; -uint32_t save_flags = old_mem->placement;struct ttm_buffer_object *ghost_obj;void *tmp_obj =NULL ;
@@ -598,7 +593,7 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, *old_mem = *new_mem; new_mem->mm_node =NULL ; -ttm_flag_masked (&save_flags, new_mem->placement,TTM_PL_MASK_MEMTYPE ); +return 0 ; }EXPORT_SYMBOL (ttm_bo_move_accel_cleanup);
Signature · 1 line
1.6.0.4
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
Thomas Hellstrom
Acked-byQuoted 16 lines · Shengquan
Quoted 7 lines · Thomas Hellstrom
Yuan,
This looks like an old leftover from a previous cleanup.Although, when I look at the code, it seems
save_flagsshould be removed completely.
Can you take a look at that and respin the patch?Yes. One declaration wasn't removed. The new patch is attached.
Quoted 4 lines
Thanks,
Thomas
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
--