[PATCH] drm/amdgpu: Fix parameter compatibility issue in amdgpu_vkms_early_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



GCC raises a parameter compatibility error log for the
amdgpu_vkms_early_init function because it previously accepted
a generic `void *handle` parameter. This change updates the
function signature to accept a specific `struct amdgpu_ip_block *`
parameter instead.

error log:
/tmp/amd.fwXY79Rm/amd/amdgpu/amdgpu_vkms.c:805:16: error:
initialization of ‘int (*)(struct amdgpu_ip_block *)’ from
incompatible pointer type ‘int (*)(void *)’ [-Werror=incompatible-pointer-types]
.early_init = amdgpu_vkms_early_init,

Acked-by:  Yifan Zhang <yifan1.zhang@xxxxxxx>
Signed-off-by: Perry Yuan <perry.yuan@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
index 5530d4ead536..e958e1cd85e0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
@@ -617,9 +617,9 @@ static const struct amdgpu_irq_src_funcs amdgpu_vkms_crtc_irq_funcs = {
 	.process = NULL,
 };
 
-static int amdgpu_vkms_early_init(void *handle)
+static int amdgpu_vkms_early_init(struct amdgpu_ip_block *ip_block)
 {
-	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+	struct amdgpu_device *adev = ip_block->adev;
 
 	adev->crtc_irq.num_types = adev->mode_info.num_crtc;
 	adev->crtc_irq.funcs = &amdgpu_vkms_crtc_irq_funcs;
-- 
2.34.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux