dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/ttm: Remove redundant code in ttm_tt_init_fields
@ 2023-05-29  9:28 Ma Jun
  2023-05-30  8:59 ` Christian König
  0 siblings, 1 reply; 3+ messages in thread
From: Ma Jun @ 2023-05-29  9:28 UTC (permalink / raw)
  To: amd-gfx, dri-devel, christian.koenig; +Cc: Ma Jun, majun

Remove redundant assignment code for ttm->caching

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
---
 drivers/gpu/drm/ttm/ttm_tt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 02b812dacc5d..45a44544b656 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -143,7 +143,6 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
 			       unsigned long extra_pages)
 {
 	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
-	ttm->caching = ttm_cached;
 	ttm->page_flags = page_flags;
 	ttm->dma_address = NULL;
 	ttm->swap_storage = NULL;
-- 
2.34.1


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

* Re: [PATCH] drm/ttm: Remove redundant code in ttm_tt_init_fields
  2023-05-29  9:28 [PATCH] drm/ttm: Remove redundant code in ttm_tt_init_fields Ma Jun
@ 2023-05-30  8:59 ` Christian König
  2023-05-31  1:17   ` Ma, Jun
  0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2023-05-30  8:59 UTC (permalink / raw)
  To: Ma Jun, amd-gfx, dri-devel; +Cc: majun

Am 29.05.23 um 11:28 schrieb Ma Jun:
> Remove redundant assignment code for ttm->caching

The explanation is missing why this is redundant, e.g. something like 
"this is overwritten just a few lines later"..

Apart from that looks good to me,
Christian.,

>
> Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
> ---
>   drivers/gpu/drm/ttm/ttm_tt.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
> index 02b812dacc5d..45a44544b656 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -143,7 +143,6 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
>   			       unsigned long extra_pages)
>   {
>   	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
> -	ttm->caching = ttm_cached;
>   	ttm->page_flags = page_flags;
>   	ttm->dma_address = NULL;
>   	ttm->swap_storage = NULL;


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

* Re: [PATCH] drm/ttm: Remove redundant code in ttm_tt_init_fields
  2023-05-30  8:59 ` Christian König
@ 2023-05-31  1:17   ` Ma, Jun
  0 siblings, 0 replies; 3+ messages in thread
From: Ma, Jun @ 2023-05-31  1:17 UTC (permalink / raw)
  To: Christian König, Ma Jun, amd-gfx, dri-devel; +Cc: majun



On 5/30/2023 4:59 PM, Christian König wrote:
> Am 29.05.23 um 11:28 schrieb Ma Jun:
>> Remove redundant assignment code for ttm->caching
> 
> The explanation is missing why this is redundant, e.g. something like 
> "this is overwritten just a few lines later"..
> 

Thanks for review. Will update the commit message in v2

Regards,
Ma Jun

> Apart from that looks good to me,
> Christian.,
> 
>>
>> Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
>> ---
>>   drivers/gpu/drm/ttm/ttm_tt.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
>> index 02b812dacc5d..45a44544b656 100644
>> --- a/drivers/gpu/drm/ttm/ttm_tt.c
>> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
>> @@ -143,7 +143,6 @@ static void ttm_tt_init_fields(struct ttm_tt *ttm,
>>   			       unsigned long extra_pages)
>>   {
>>   	ttm->num_pages = (PAGE_ALIGN(bo->base.size) >> PAGE_SHIFT) + extra_pages;
>> -	ttm->caching = ttm_cached;
>>   	ttm->page_flags = page_flags;
>>   	ttm->dma_address = NULL;
>>   	ttm->swap_storage = NULL;
> 

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

end of thread, other threads:[~2023-05-31  1:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29  9:28 [PATCH] drm/ttm: Remove redundant code in ttm_tt_init_fields Ma Jun
2023-05-30  8:59 ` Christian König
2023-05-31  1:17   ` Ma, Jun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).