Skip to contentSkip to conversation

drm/ttm: Remove redundant code in ttm_tt_init_fields

PATCH In review Ma Jun 4 participants 5 messages May 31, 2023

Subsystems (3)
lore
Share & tools
lore

Ma Jun

author
#0 lore raw

PATCH v2 1/1 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.

---
 drivers/gpu/drm/ttm/ttm_tt.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/ttm/ttm_tt.c +0 -1
index 02b812dacc5d..45a44544b656 100644
@@ -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;
Signature · 1 line
2.34.1
#1 lore raw

[Public]

Quoted 9 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Ma Jun
Sent: Wednesday, May 31, 2023 1:31 PM
To: [email protected]; [email protected]; Koenig, Christian <[email protected]>
Cc: Ma, Jun <[email protected]>
Subject: [PATCH v2] drm/ttm: Remove redundant code in ttm_tt_init_fields

Quoted 3 lines

Remove redundant assignment code for ttm->caching as it's overwritten

just a few lines later.

Please drop the blank line in above message. With it fixed, the patch is: Reviewed-by: Guchun Chen <[email protected]>

Regards,
Guchun

Quoted 23 lines

v2:
- Update the commit message.

---
 drivers/gpu/drm/ttm/ttm_tt.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/ttm/ttm_tt.c +0 -1
index 02b812dacc5d..45a44544b656 100644
@@ -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

#2 lore raw
Quoted 11 lines · Guchun

[Public]

Quoted 9 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Ma Jun
Sent: Wednesday, May 31, 2023 1:31 PM
To: [email protected]; [email protected]; Koenig, Christian <[email protected]>
Cc: Ma, Jun <[email protected]>
Subject: [PATCH v2] drm/ttm: Remove redundant code in ttm_tt_init_fields

Quoted 6 lines
Quoted 3 lines

Remove redundant assignment code for ttm->caching as it's overwritten

just a few lines later.

Please drop the blank line in above message. With it fixed, the patch is: Reviewed-by: Guchun Chen <[email protected]>

Thanks for review. Will fix it when push.

Regards,
Ma Jun

Quoted 27 lines

Regards,
Guchun

Quoted 23 lines

v2:
- Update the commit message.

---
 drivers/gpu/drm/ttm/ttm_tt.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/ttm/ttm_tt.c +0 -1
index 02b812dacc5d..45a44544b656 100644
@@ -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

#3 lore raw
In reply to Chen, Guchun

Am 31.05.23 um 08:20 schrieb Chen, Guchun:

Quoted 11 lines

[Public]

Quoted 9 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Ma Jun
Sent: Wednesday, May 31, 2023 1:31 PM
To: [email protected]; [email protected]; Koenig, Christian <[email protected]>
Cc: Ma, Jun <[email protected]>
Subject: [PATCH v2] drm/ttm: Remove redundant code in ttm_tt_init_fields

Quoted 4 lines
Quoted 3 lines

Remove redundant assignment code for ttm->caching as it's overwritten

just a few lines later.

Please drop the blank line in above message. With it fixed, the patch is: Reviewed-by: Guchun Chen <[email protected]>

Seconded, I'm going to pick that patch up and submit it to drm-misc-next with the commit message fixed.

Regards,
Christian.

Quoted 27 lines

Regards,
Guchun

Quoted 23 lines

v2:
- Update the commit message.

---
  drivers/gpu/drm/ttm/ttm_tt.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/ttm/ttm_tt.c +0 -1
index 02b812dacc5d..45a44544b656 100644
@@ -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

#4 lore raw
Quoted 12 lines · Christian König

Am 31.05.23 um 08:20 schrieb Chen, Guchun:

Quoted 11 lines

[Public]

Quoted 9 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Ma Jun
Sent: Wednesday, May 31, 2023 1:31 PM
To: [email protected]; [email protected]; Koenig, Christian <[email protected]>
Cc: Ma, Jun <[email protected]>
Subject: [PATCH v2] drm/ttm: Remove redundant code in ttm_tt_init_fields

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

Remove redundant assignment code for ttm->caching as it's overwritten

just a few lines later.

Please drop the blank line in above message. With it fixed, the patch is: Reviewed-by: Guchun Chen <[email protected]>

Seconded, I'm going to pick that patch up and submit it to drm-misc-next with the commit message fixed.

Thanks for help.

Regards,
Ma Jun

Quoted 31 lines

Regards,
Christian.

Quoted 27 lines

Regards,
Guchun

Quoted 23 lines

v2:
- Update the commit message.

---
  drivers/gpu/drm/ttm/ttm_tt.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/ttm/ttm_tt.c +0 -1
index 02b812dacc5d..45a44544b656 100644
@@ -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