drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9
Subsystems (3)
PATCH 7/8 drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9
To fix the warning about unused value,
remove the use_static and use the parameter is_static directly.
Signed-off-by Jesse Zhang <[email protected]>
Suggested-by Felix Kuehling <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c +1 -3
@@ -213,7 +213,6 @@ static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer, struct queue *q, bool is_static) {struct pm4_mes_map_queues *packet; -bool use_static = is_static; packet = (struct pm4_mes_map_queues *)buffer;memset (buffer,0 ,sizeof (struct pm4_mes_map_queues ));
@@ -234,7 +233,7 @@ static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer,switch (q->properties.type) {case KFD_QUEUE_TYPE_COMPUTE : -if (use_static) +if (is_static) packet->bitfields2.queue_type = queue_type__mes_map_queues__normal_latency_static_queue_vi;break ;
@@ -244,7 +243,6 @@ static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer,break ;case KFD_QUEUE_TYPE_SDMA :case KFD_QUEUE_TYPE_SDMA_XGMI : - use_static = false;/* no static queues under SDMA */ if (q->properties.sdma_engine_id <2 && !pm_use_ext_eng (q->device->kfd)) packet->bitfields2.engine_sel = q->properties.sdma_engine_id +
Signature · 1 line
2.25.1
Quoted 5 lines · Jesse Zhang
To fix the warning about unused value,
remove theuse_staticand use the parameteris_staticdirectly.Signed-off-by Jesse Zhang <[email protected]>Suggested-by Felix Kuehling <[email protected]>
Reviewed-by Felix Kuehling <[email protected]>
Quoted 33 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c +1
-3@@ -213,7 +213,6 @@ static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer, struct queue *q, bool is_static) {struct pm4_mes_map_queues *packet; -bool use_static = is_static; packet = (struct pm4_mes_map_queues *)buffer;memset (buffer,0 ,sizeof (struct pm4_mes_map_queues ));@@ -234,7 +233,7 @@ static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer,switch (q->properties.type) {case KFD_QUEUE_TYPE_COMPUTE : -if (use_static) +if (is_static) packet->bitfields2.queue_type = queue_type__mes_map_queues__normal_latency_static_queue_vi;break ;@@ -244,7 +243,6 @@ static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer,break ;case KFD_QUEUE_TYPE_SDMA :case KFD_QUEUE_TYPE_SDMA_XGMI : - use_static = false;/* no static queues under SDMA */ if (q->properties.sdma_engine_id <2 && !pm_use_ext_eng (q->device->kfd)) packet->bitfields2.engine_sel = q->properties.sdma_engine_id +