LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] drm/amdkfd: fix typing in (*hqd_destroy)
@ 2018-04-24 13:14 Luc Van Oostenryck
  2018-04-24 19:09 ` Felix Kuehling
  0 siblings, 1 reply; 2+ messages in thread
From: Luc Van Oostenryck @ 2018-04-24 13:14 UTC (permalink / raw)
  To: linux-kernel
  Cc: Luc Van Oostenryck, Oded Gabbay, Alex Deucher,
	Christian König, David (ChunMing) Zhou, David Airlie,
	dri-devel, amd-gfx

The method (*hqd_destroy) is defined as using an 'uint32_t'
as 3rd argument but the the actual implementation of this
method and all its calls actually uses an 'enum kfd_preempt_type'
for this argument.

Fix this by using 'enum kfd_preempt_type' for (*hqd_destroy) too.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
index 237289a72..2890e8581 100644
--- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
+++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
@@ -298,7 +298,7 @@ struct kfd2kgd_calls {
 	bool (*hqd_is_occupied)(struct kgd_dev *kgd, uint64_t queue_address,
 				uint32_t pipe_id, uint32_t queue_id);
 
-	int (*hqd_destroy)(struct kgd_dev *kgd, void *mqd, uint32_t reset_type,
+	int (*hqd_destroy)(struct kgd_dev *kgd, void *mqd, enum kfd_preempt_type reset_type,
 				unsigned int timeout, uint32_t pipe_id,
 				uint32_t queue_id);
 
-- 
2.17.0

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

* Re: [PATCH] drm/amdkfd: fix typing in (*hqd_destroy)
  2018-04-24 13:14 [PATCH] drm/amdkfd: fix typing in (*hqd_destroy) Luc Van Oostenryck
@ 2018-04-24 19:09 ` Felix Kuehling
  0 siblings, 0 replies; 2+ messages in thread
From: Felix Kuehling @ 2018-04-24 19:09 UTC (permalink / raw)
  To: Luc Van Oostenryck, linux-kernel
  Cc: Oded Gabbay, David (ChunMing) Zhou, David Airlie, dri-devel,
	amd-gfx, Alex Deucher, Christian König


On 2018-04-24 09:14 AM, Luc Van Oostenryck wrote:
> The method (*hqd_destroy) is defined as using an 'uint32_t'
> as 3rd argument but the the actual implementation of this
> method and all its calls actually uses an 'enum kfd_preempt_type'
> for this argument.
>
> Fix this by using 'enum kfd_preempt_type' for (*hqd_destroy) too.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>

Interesting. I'm surprised I never saw a compiler warning about a
function pointer type mismatch. I guess C isn't picky about integer
types as long as the size is the same.

Anyway, this patch is Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>

> ---
>  drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> index 237289a72..2890e8581 100644
> --- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> +++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> @@ -298,7 +298,7 @@ struct kfd2kgd_calls {
>  	bool (*hqd_is_occupied)(struct kgd_dev *kgd, uint64_t queue_address,
>  				uint32_t pipe_id, uint32_t queue_id);
>  
> -	int (*hqd_destroy)(struct kgd_dev *kgd, void *mqd, uint32_t reset_type,
> +	int (*hqd_destroy)(struct kgd_dev *kgd, void *mqd, enum kfd_preempt_type reset_type,
>  				unsigned int timeout, uint32_t pipe_id,
>  				uint32_t queue_id);
>  

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

end of thread, other threads:[~2018-04-24 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 13:14 [PATCH] drm/amdkfd: fix typing in (*hqd_destroy) Luc Van Oostenryck
2018-04-24 19:09 ` Felix Kuehling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).