AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 7/8] drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9
@ 2024-05-30  3:50 Jesse Zhang
  2024-05-30 14:12 ` Christian König
  0 siblings, 1 reply; 5+ messages in thread
From: Jesse Zhang @ 2024-05-30  3:50 UTC (permalink / raw)
  To: amd-gfx
  Cc: Alexander.Deucher, Christian Koenig, Felix Kuehling, jonathan.kim,
	Tim.Huang, Jesse Zhang, Jesse Zhang

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

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
index 8ee2bedd301a..c09476273f73 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
@@ -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 +
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 7/8] drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9
  2024-05-30  3:50 Jesse Zhang
@ 2024-05-30 14:12 ` Christian König
  2024-05-30 20:51   ` Felix Kuehling
  0 siblings, 1 reply; 5+ messages in thread
From: Christian König @ 2024-05-30 14:12 UTC (permalink / raw)
  To: Jesse Zhang, amd-gfx
  Cc: Alexander.Deucher, Felix Kuehling, jonathan.kim, Tim.Huang

Am 30.05.24 um 05:50 schrieb Jesse Zhang:
> 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.

>
> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
> index 8ee2bedd301a..c09476273f73 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
> @@ -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 +


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 7/8] drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9
  2024-05-30 14:12 ` Christian König
@ 2024-05-30 20:51   ` Felix Kuehling
  0 siblings, 0 replies; 5+ messages in thread
From: Felix Kuehling @ 2024-05-30 20:51 UTC (permalink / raw)
  To: Christian König, Jesse Zhang, amd-gfx
  Cc: Alexander.Deucher, jonathan.kim, Tim.Huang


On 2024-05-30 10:12, Christian König wrote:
> Am 30.05.24 um 05:50 schrieb Jesse Zhang:
>> 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.
>
>>
>> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c 
>> b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
>> index 8ee2bedd301a..c09476273f73 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
>> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
>> @@ -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


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 7/8] drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9
@ 2024-05-31  2:51 Jesse Zhang
  2024-05-31 18:46 ` Felix Kuehling
  0 siblings, 1 reply; 5+ messages in thread
From: Jesse Zhang @ 2024-05-31  2:51 UTC (permalink / raw)
  To: amd-gfx
  Cc: Alexander.Deucher, Christian Koenig, Felix Kuehling, jonathan.kim,
	Tim.Huang, Jesse Zhang, Jesse Zhang

To fix the warning about unused value,
remove the use_static and use the parameter is_static directly.

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Suggested-by: Felix Kuehling <felix.kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
index 8ee2bedd301a..00776f08351c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
@@ -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 +
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 7/8] drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9
  2024-05-31  2:51 [PATCH 7/8] drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9 Jesse Zhang
@ 2024-05-31 18:46 ` Felix Kuehling
  0 siblings, 0 replies; 5+ messages in thread
From: Felix Kuehling @ 2024-05-31 18:46 UTC (permalink / raw)
  To: Jesse Zhang, amd-gfx
  Cc: Alexander.Deucher, Christian Koenig, jonathan.kim, Tim.Huang


On 2024-05-30 22:51, Jesse Zhang wrote:
> To fix the warning about unused value,
> remove the use_static and use the parameter is_static directly.
>
> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
> Suggested-by: Felix Kuehling <felix.kuehling@amd.com>

Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>


> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
> index 8ee2bedd301a..00776f08351c 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c
> @@ -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 +

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-31 18:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31  2:51 [PATCH 7/8] drm/amdkfd: Comment out the unused variable use_static in pm_map_queues_v9 Jesse Zhang
2024-05-31 18:46 ` Felix Kuehling
  -- strict thread matches above, loose matches on Subject: below --
2024-05-30  3:50 Jesse Zhang
2024-05-30 14:12 ` Christian König
2024-05-30 20:51   ` Felix Kuehling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox