Skip to contentSkip to conversation

drm/amdgpu: remove unused variable in amdgpu_dma_buf_unmap()

PATCH In review Kevin Wang 3 participants 3 messages Feb 26, 2021

Subsystems (2)
lore
Share & tools
lore

Kevin Wang

author
#0 lore raw

PATCH 1/1 drm/amdgpu: remove unused variable in amdgpu_dma_buf_unmap()

clean up unsued variable in amdgpu_dma_buf_unmap().

Fixes:
drm/amdgpu: Remove amdgpu_device arg from free_sgt api

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +0 -4
index e83d73ec0e9d..5ec6556ebf7a 100644
@@ -356,10 +356,6 @@ static void amdgpu_dma_buf_unmap(struct dma_buf_attachment *attach,
 				 struct sg_table *sgt,
 				 enum dma_data_direction dir)
 {
-	struct dma_buf *dma_buf = attach->dmabuf;
-	struct drm_gem_object *obj = dma_buf->priv;
-	struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
-
 	if (sgt->sgl->page_link) {
 		dma_unmap_sgtable(attach->dev, sgt, dir, 0);
 		sg_free_table(sgt);
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

[AMD Public Use]

Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Kevin Wang
Sent: Friday, February 26, 2021 12:25
To: [email protected]
Cc: Wang, Kevin(Yang) <[email protected]>
Subject: [PATCH] drm/amdgpu: remove unused variable in amdgpu_dma_buf_unmap()

clean up unsued variable in amdgpu_dma_buf_unmap().

Fixes:
drm/amdgpu: Remove amdgpu_device arg from free_sgt api

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +0 -4
index e83d73ec0e9d..5ec6556ebf7a 100644
@@ -356,10 +356,6 @@ static void amdgpu_dma_buf_unmap(struct dma_buf_attachment *attach,
 				 struct sg_table *sgt,
 				 enum dma_data_direction dir)
 {
-	struct dma_buf *dma_buf = attach->dmabuf;
-	struct drm_gem_object *obj = dma_buf->priv;
-	struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
-
 	if (sgt->sgl->page_link) {
 		dma_unmap_sgtable(attach->dev, sgt, dir, 0);
 		sg_free_table(sgt);
Signature · 10 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Chawking.zhang%40amd.com%7C9555021bae2f415e1bef08d8da0e8125%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637499103125405709%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=y21rsObIUGSeS2XiFfVMrUNuD5%2Fc%2BrfXjOd%2BamdLa60%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#2 lore raw
In reply to Kevin Wang

Am 26.02.21 um 05:24 schrieb Kevin Wang:

Quoted 6 lines

clean up unsued variable in amdgpu_dma_buf_unmap().

Fixes:
drm/amdgpu: Remove amdgpu_device arg from free_sgt api

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 4 ----
  1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +0 -0
index e83d73ec0e9d..5ec6556ebf7a 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c static void amdgpu_dma_buf_unmap(struct dma_buf_attachment *attach, · line 361

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +0 -4
@@ -356,10 +356,6 @@ static void amdgpu_dma_buf_unmap(struct dma_buf_attachment *attach,
  				 struct sg_table *sgt,
  				 enum dma_data_direction dir)
  {
-	struct dma_buf *dma_buf = attach->dmabuf;
-	struct drm_gem_object *obj = dma_buf->priv;
-	struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
-
  	if (sgt->sgl->page_link) {
  		dma_unmap_sgtable(attach->dev, sgt, dir, 0);
  		sg_free_table(sgt);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx