All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
@ 2010-01-19  5:10 Yuan, Shengquan
  2010-01-20 10:48 ` Thomas Hellstrom
  0 siblings, 1 reply; 4+ messages in thread
From: Yuan, Shengquan @ 2010-01-19  5:10 UTC (permalink / raw)
  To: dri-devel

commit d60326ac977a5e99047b44f9b313ff79cd3a14b4
Author: Austin Yuan <shengquan.yuan@gmail.com>
Date:   Tue Jan 19 11:45:24 2010 +0800

    drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c

    Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>

diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c
b/drivers/gpu/drm/ttm/ttm_bo_util.c
index ceae52f..a6fca9e 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -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
--

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

* Re: [patch] drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
  2010-01-19  5:10 [patch] drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c Yuan, Shengquan
@ 2010-01-20 10:48 ` Thomas Hellstrom
  2010-01-21  5:53   ` Yuan, Shengquan
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Hellstrom @ 2010-01-20 10:48 UTC (permalink / raw)
  To: Yuan, Shengquan; +Cc: dri-devel

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



Yuan, Shengquan wrote:
> commit d60326ac977a5e99047b44f9b313ff79cd3a14b4
> Author: Austin Yuan <shengquan.yuan@gmail.com>
> Date:   Tue Jan 19 11:45:24 2010 +0800
>
>     drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
>
>     Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c
> b/drivers/gpu/drm/ttm/ttm_bo_util.c
> index ceae52f..a6fca9e 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
> @@ -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
> --
> _______________________________________________
> Dri-devel mailing list
> Dri-devel@lists.sourceforge.net
> 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
--

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

* Re: [patch] drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
  2010-01-20 10:48 ` Thomas Hellstrom
@ 2010-01-21  5:53   ` Yuan, Shengquan
  2010-01-21 15:09     ` Thomas Hellstrom
  0 siblings, 1 reply; 4+ messages in thread
From: Yuan, Shengquan @ 2010-01-21  5:53 UTC (permalink / raw)
  To: Thomas Hellstrom; +Cc: dri-devel

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

On Wed, Jan 20, 2010 at 6:48 PM, Thomas Hellstrom <thomas@shipmail.org> wrote:
> 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?
Yes. One declaration wasn't removed. The new patch is attached.

>
> Thanks,
> Thomas
>

[-- Attachment #2: 0001-drm-ttm-remove-unnecessary-save_flags-and-ttm_flag_.patch --]
[-- Type: application/octet-stream, Size: 2445 bytes --]

From 28b1013a21e54db062e2b79112bdbefcb99f8297 Mon Sep 17 00:00:00 2001
From: Austin Yuan <shengquan.yuan@gmail.com>
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

Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
---
 drivers/gpu/drm/ttm/ttm_bo_util.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index ceae52f..3f72fe1 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -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);
-- 
1.6.0.4


[-- Attachment #3: Type: text/plain, Size: 420 bytes --]

------------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 161 bytes --]

--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

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

* Re: [patch] drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c
  2010-01-21  5:53   ` Yuan, Shengquan
@ 2010-01-21 15:09     ` Thomas Hellstrom
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Hellstrom @ 2010-01-21 15:09 UTC (permalink / raw)
  To: Yuan, Shengquan; +Cc: dri-devel

Yuan, Shengquan wrote:
> On Wed, Jan 20, 2010 at 6:48 PM, Thomas Hellstrom <thomas@shipmail.org> wrote:
>   
>> 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?
>>     
> Yes. One declaration wasn't removed. The new patch is attached.
>
>   
>> Thanks,
>> Thomas
>>
>>     

Acked-by: Thomas Hellstrom <thellstrom@vmware.com>



------------------------------------------------------------------------------
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
--

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

end of thread, other threads:[~2010-01-21 15:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19  5:10 [patch] drm/ttm: remove unnecessary save_flags and ttm_flag_masked in ttm_bo_util.c Yuan, Shengquan
2010-01-20 10:48 ` Thomas Hellstrom
2010-01-21  5:53   ` Yuan, Shengquan
2010-01-21 15:09     ` Thomas Hellstrom

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.