mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/ttm: Remove duplicate assignments to ttm->caching
@ 2023-06-25  2:45 Feng Jiang
  2023-06-29  6:37 ` Christian König
       [not found] ` <1688091259850883.47.seg@mailgw>
  0 siblings, 2 replies; 3+ messages in thread
From: Feng Jiang @ 2023-06-25  2:45 UTC (permalink / raw)
  To: christian.koenig, ray.huang, airlied, daniel, michael.j.ruhl
  Cc: dri-devel, linux-kernel, Feng Jiang

The parameter 'caching' has already been assigned to
'ttm->caching', so 'ttm_cached' is redundant.

Fixes: 1b4ea4c5980f ("drm/ttm: set the tt caching state at creation time")
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
---
 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 ab725d9d14a6..1ce4b36ab33b 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -137,7 +137,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.41.0


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

* Re: [PATCH] drm/ttm: Remove duplicate assignments to ttm->caching
  2023-06-25  2:45 [PATCH] drm/ttm: Remove duplicate assignments to ttm->caching Feng Jiang
@ 2023-06-29  6:37 ` Christian König
       [not found] ` <1688091259850883.47.seg@mailgw>
  1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2023-06-29  6:37 UTC (permalink / raw)
  To: Feng Jiang, ray.huang, airlied, daniel, michael.j.ruhl
  Cc: dri-devel, linux-kernel

This has already been fixed with:

commit 2ce977df10c179138e2723b25c2d2c055a3e3cc6
Author: Ma Jun <Jun.Ma2@amd.com>
Date:   Wed May 31 13:30:51 2023 +0800

     drm/ttm: Remove redundant code in ttm_tt_init_fields

     Remove redundant assignment code for ttm->caching as it's overwritten
     just a few lines later.

     v2:
      - Update the commit message.

     Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
     Reviewed-by: Guchun Chen <guchun.chen@amd.com>
     Reviewed-by: Christian König <christian.koenig@amd.com>
     Signed-off-by: Christian König <christian.koenig@amd.com>
     Link: 
https://patchwork.freedesktop.org/patch/msgid/20230531053051.3453509-1-Jun.Ma2@amd.com


Regards,
Christian.

Am 25.06.23 um 04:45 schrieb Feng Jiang:
> The parameter 'caching' has already been assigned to
> 'ttm->caching', so 'ttm_cached' is redundant.
>
> Fixes: 1b4ea4c5980f ("drm/ttm: set the tt caching state at creation time")
> Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
> ---
>   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 ab725d9d14a6..1ce4b36ab33b 100644
> --- a/drivers/gpu/drm/ttm/ttm_tt.c
> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
> @@ -137,7 +137,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 duplicate assignments to ttm->caching
       [not found] ` <1688091259850883.47.seg@mailgw>
@ 2023-06-30  2:19   ` Feng Jiang
  0 siblings, 0 replies; 3+ messages in thread
From: Feng Jiang @ 2023-06-30  2:19 UTC (permalink / raw)
  To: Christian König, ray.huang, airlied, daniel, michael.j.ruhl
  Cc: dri-devel, linux-kernel

On 2023/6/29 14:37, Christian König wrote:
> This has already been fixed with:
> 
> commit 2ce977df10c179138e2723b25c2d2c055a3e3cc6
> Author: Ma Jun <Jun.Ma2@amd.com>
> Date:   Wed May 31 13:30:51 2023 +0800
> 
>     drm/ttm: Remove redundant code in ttm_tt_init_fields
> 
>     Remove redundant assignment code for ttm->caching as it's overwritten
>     just a few lines later.
> 
>     v2:
>      - Update the commit message.
> 
>     Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
>     Reviewed-by: Guchun Chen <guchun.chen@amd.com>
>     Reviewed-by: Christian König <christian.koenig@amd.com>
>     Signed-off-by: Christian König <christian.koenig@amd.com>
>     Link: https://patchwork.freedesktop.org/patch/msgid/20230531053051.3453509-1-Jun.Ma2@amd.com
> 
> 
> Regards,
> Christian.
> 
> Am 25.06.23 um 04:45 schrieb Feng Jiang:
>> The parameter 'caching' has already been assigned to
>> 'ttm->caching', so 'ttm_cached' is redundant.
>>
>> Fixes: 1b4ea4c5980f ("drm/ttm: set the tt caching state at creation time")
>> Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
>> ---
>>   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 ab725d9d14a6..1ce4b36ab33b 100644
>> --- a/drivers/gpu/drm/ttm/ttm_tt.c
>> +++ b/drivers/gpu/drm/ttm/ttm_tt.c
>> @@ -137,7 +137,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;
> 
Sorry, I will check before sending next time, thanks!
-- 
Best regards,
Feng


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

end of thread, other threads:[~2023-06-30  2:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-25  2:45 [PATCH] drm/ttm: Remove duplicate assignments to ttm->caching Feng Jiang
2023-06-29  6:37 ` Christian König
     [not found] ` <1688091259850883.47.seg@mailgw>
2023-06-30  2:19   ` Feng Jiang

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

all inboxes | Powered by JetHome®