Skip to contentSkip to conversation

drm/amdgpu: remove set but not used variables

PATCH Applied Zheng Bin 3 participants 6 messages Apr 30, 2020

Subsystems (2)
lore
Share & tools
lore

Zheng Bin

author
#0 lore raw

cover drm/amdgpu: remove set but not used variables

Zheng Bin (3):
drm/amdgpu: remove set but not used variable 'priority' drm/amdgpu: remove set but not used variable 'direct_poll' in

    vcn_v2_0.c
  drm/amdgpu: remove set but not used variable 'direct_poll' in
    vcn_v2_5.c
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 --
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c  | 3 ---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c  | 2 --
 3 files changed, 7 deletions(-)

--
2.26.0.106.g9fadedd

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

author
#1 lore raw

PATCH 1/3 drm/amdgpu: remove set but not used variable 'priority'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:1211:26: warning: variable ‘priority’ set but not used

It is not used since commit 33abcb1f5a17 ("drm/amdgpu:
set compute queue priority at mqd_init")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +0 -2
index 7653f62b1b2d..19070226a945 100644
@@ -1208,7 +1208,6 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
 {
 	struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
 	struct drm_sched_entity *entity = p->entity;
-	enum drm_sched_priority priority;
 	struct amdgpu_bo_list_entry *e;
 	struct amdgpu_job *job;
 	uint64_t seq;
@@ -1258,7 +1257,6 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
 
 	trace_amdgpu_cs_ioctl(job);
 	amdgpu_vm_bo_trace_cs(&fpriv->vm, &p->ticket);
-	priority = job->base.s_priority;
 	drm_sched_entity_push_job(&job->base, entity);
 
 	amdgpu_vm_move_to_lru_tail(p->adev, &fpriv->vm);

--
2.26.0.106.g9fadedd

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

author
#2 lore raw

PATCH 2/3 drm/amdgpu: remove set but not used variable 'direct_poll' in vcn_v2_0.c

In reply to Zheng Bin

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1848:39: warning: variable ‘direct_poll’ set but not used [-Wunused-but-set-variable]

It is introduced by commit dd26858a9cd8 ("drm/amdgpu:
implement initialization part on VCN2.0 for SRIOV"), but never used, so remove it.

---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +0 -3
index 349da7bf7c68..90ed773695ea 100644
@@ -1845,7 +1845,6 @@ static int vcn_v2_0_start_sriov(struct amdgpu_device *adev)
 	uint32_t table_size = 0;
 	struct mmsch_v2_0_cmd_direct_write direct_wt = { {0} };
 	struct mmsch_v2_0_cmd_direct_read_modify_write direct_rd_mod_wt = { {0} };
-	struct mmsch_v2_0_cmd_direct_polling direct_poll = { {0} };
 	struct mmsch_v2_0_cmd_end end = { {0} };
 	struct mmsch_v2_0_init_header *header;
 	uint32_t *init_table = adev->virt.mm_table.cpu_addr;
@@ -1855,8 +1854,6 @@ static int vcn_v2_0_start_sriov(struct amdgpu_device *adev)
 	direct_wt.cmd_header.command_type = MMSCH_COMMAND__DIRECT_REG_WRITE;
 	direct_rd_mod_wt.cmd_header.command_type =
 		MMSCH_COMMAND__DIRECT_REG_READ_MODIFY_WRITE;
-	direct_poll.cmd_header.command_type =
-		MMSCH_COMMAND__DIRECT_REG_POLLING;
 	end.cmd_header.command_type = MMSCH_COMMAND__END;
 
 	if (header->vcn_table_offset == 0 && header->vcn_table_size == 0) {

--
2.26.0.106.g9fadedd

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

author
#3 lore raw

PATCH 3/3 drm/amdgpu: remove set but not used variable 'direct_poll' in vcn_v2_5.c

In reply to Zheng Bin

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:1170:39: warning: variable ‘direct_poll’ set but not used [-Wunused-but-set-variable]

It is introduced by commit 7daaebfea5e5 ("drm/amdgpu:
add VCN2.5 sriov start for Arctrus"), but never used, so remove it.

---
 drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +0 -2
index 38ca4a712f12..5c1b9ed76534 100644
@@ -1167,14 +1167,12 @@ static int vcn_v2_5_sriov_start(struct amdgpu_device *adev)
 	uint32_t table_size = 0;
 	struct mmsch_v1_0_cmd_direct_write direct_wt = { { 0 } };
 	struct mmsch_v1_0_cmd_direct_read_modify_write direct_rd_mod_wt = { { 0 } };
-	struct mmsch_v1_0_cmd_direct_polling direct_poll = { { 0 } };
 	struct mmsch_v1_0_cmd_end end = { { 0 } };
 	uint32_t *init_table = adev->virt.mm_table.cpu_addr;
 	struct mmsch_v1_1_init_header *header = (struct mmsch_v1_1_init_header *)init_table;
 
 	direct_wt.cmd_header.command_type = MMSCH_COMMAND__DIRECT_REG_WRITE;
 	direct_rd_mod_wt.cmd_header.command_type = MMSCH_COMMAND__DIRECT_REG_READ_MODIFY_WRITE;
-	direct_poll.cmd_header.command_type = MMSCH_COMMAND__DIRECT_REG_POLLING;
 	end.cmd_header.command_type = MMSCH_COMMAND__END;
 
 	header->version = MMSCH_VERSION;

--
2.26.0.106.g9fadedd

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

Reviewed-by on the v1 series
#4 lore raw
In reply to Zheng Bin

Am 30.04.20 um 04:26 schrieb Zheng Bin:

Quoted 12 lines

Zheng Bin (3):
drm/amdgpu: remove set but not used variable 'priority' drm/amdgpu: remove set but not used variable 'direct_poll' in

     vcn_v2_0.c
   drm/amdgpu: remove set but not used variable 'direct_poll' in
     vcn_v2_5.c
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 --
  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c  | 3 ---
  drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c  | 2 --
  3 files changed, 7 deletions(-)
Quoted 7 lines

--
2.26.0.106.g9fadedd

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

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

Applied
#5 lore raw

Applied. Thanks!

Alex

Quoted 24 lines · Christian König

Am 30.04.20 um 04:26 schrieb Zheng Bin:

Quoted 12 lines

Zheng Bin (3):
drm/amdgpu: remove set but not used variable 'priority' drm/amdgpu: remove set but not used variable 'direct_poll' in

     vcn_v2_0.c
   drm/amdgpu: remove set but not used variable 'direct_poll' in
     vcn_v2_5.c
  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 --
  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c  | 3 ---
  drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c  | 2 --
  3 files changed, 7 deletions(-)
Quoted 7 lines

--
2.26.0.106.g9fadedd

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

Quoted 4 lines

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

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