From: Tao Zhou Date: Thu, 12 Sep 2019 10:54:33 +0000 (+0800) Subject: drm/amdgpu: remove ih_info parameter of umc_ras_late_init X-Git-Tag: Ubuntu-5.10.0-12.13~4057^2~26^2~95 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=56c54b25c3b60a64d4ffd7b6b2a309b3febcfdd4;p=mirror_ubuntu-hirsute-kernel.git drm/amdgpu: remove ih_info parameter of umc_ras_late_init umc_ras_late_init can get the info by itself Signed-off-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c index acc0c428f6fa..08037f086d28 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c @@ -23,17 +23,16 @@ #include "amdgpu_ras.h" -int amdgpu_umc_ras_late_init(struct amdgpu_device *adev, void *ras_ih_info) +int amdgpu_umc_ras_late_init(struct amdgpu_device *adev) { int r; - struct ras_ih_if *ih_info = (struct ras_ih_if *)ras_ih_info; struct ras_fs_if fs_info = { .sysfs_name = "umc_err_count", .debugfs_name = "umc_err_inject", }; - - if (!ih_info) - return -EINVAL; + struct ras_ih_if ih_info = { + .cb = amdgpu_umc_process_ras_data_cb, + }; if (!adev->umc.ras_if) { adev->umc.ras_if = @@ -45,10 +44,10 @@ int amdgpu_umc_ras_late_init(struct amdgpu_device *adev, void *ras_ih_info) adev->umc.ras_if->sub_block_index = 0; strcpy(adev->umc.ras_if->name, "umc"); } - ih_info->head = fs_info.head = *adev->umc.ras_if; + ih_info.head = fs_info.head = *adev->umc.ras_if; r = amdgpu_ras_late_init(adev, adev->umc.ras_if, - &fs_info, ih_info); + &fs_info, &ih_info); if (r) goto free; @@ -68,7 +67,7 @@ int amdgpu_umc_ras_late_init(struct amdgpu_device *adev, void *ras_ih_info) return 0; late_fini: - amdgpu_ras_late_fini(adev, adev->umc.ras_if, ih_info); + amdgpu_ras_late_fini(adev, adev->umc.ras_if, &ih_info); free: kfree(adev->umc.ras_if); adev->umc.ras_if = NULL; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h index 72c378aec724..8cc9852e99e6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h @@ -55,7 +55,7 @@ struct amdgpu_umc_funcs { void (*err_cnt_init)(struct amdgpu_device *adev); - int (*ras_late_init)(struct amdgpu_device *adev, void *ras_ih_info); + int (*ras_late_init)(struct amdgpu_device *adev); void (*query_ras_error_count)(struct amdgpu_device *adev, void *ras_error_status); void (*query_ras_error_address)(struct amdgpu_device *adev, @@ -82,7 +82,7 @@ struct amdgpu_umc { const struct amdgpu_umc_funcs *funcs; }; -int amdgpu_umc_ras_late_init(struct amdgpu_device *adev, void *ras_ih_info); +int amdgpu_umc_ras_late_init(struct amdgpu_device *adev); int amdgpu_umc_process_ras_data_cb(struct amdgpu_device *adev, void *ras_error_status, struct amdgpu_iv_entry *entry); diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 5ba99f8aec2e..bf7929499f0a 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -740,12 +740,9 @@ static int gmc_v9_0_ecc_late_init(void *handle) { int r; struct amdgpu_device *adev = (struct amdgpu_device *)handle; - struct ras_ih_if umc_ih_info = { - .cb = amdgpu_umc_process_ras_data_cb, - }; if (adev->umc.funcs && adev->umc.funcs->ras_late_init) { - r = adev->umc.funcs->ras_late_init(adev, &umc_ih_info); + r = adev->umc.funcs->ras_late_init(adev); if (r) return r; }