Skip to contentSkip to conversation

drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9

PATCH In review Jesse Zhang 3 participants 3 messages May 30, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 7/8 drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9

To fix the warning about unused value, comment out the variable use_static.

---
 drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c +1 -1
index 8ee2bedd301a..c09476273f73 100644
@@ -244,7 +244,7 @@ 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 */
+		//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
maintainer
#1 lore raw

Am 30.05.24 um 05:50 schrieb Jesse Zhang:

Quoted 1 line

To fix the warning about unused value, comment out the variable use_static.

Commenting out variables with // will just get you another warning from checkpatch.

Christian.

Quoted 19 lines
---
  drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c +1 -1
index 8ee2bedd301a..c09476273f73 100644
@@ -244,7 +244,7 @@ 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 */
+		//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 +
maintainer
#2 lore raw
Quoted 13 lines · Christian König

Am 30.05.24 um 05:50 schrieb Jesse Zhang:

Quoted 1 line

To fix the warning about unused value, comment out the variable use_static.

Commenting out variables with // will just get you another warning from checkpatch.

Christian.

Quoted 6 lines

---
  drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c +0 -0
index 8ee2bedd301a..c09476273f73 100644
@@ -244,7 +244,7 @@ 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 */ +        //use_static = false; /* no static queues under SDMA */

I'd just remove this line, remove the use_static variable and use the parameter is_static directly under case KFD_QUEUE_TYPE_COMPUTE.

Regards,
  Felix

Quoted 4 lines
Quoted 3 lines

          if (q->properties.sdma_engine_id < 2 && !pm_use_ext_eng(q->device->kfd)) packet->bitfields2.engine_sel = q->properties.sdma_engine_id +