Skip to content
Snippets Groups Projects
  • SRINIVASAN SHANMUGAM's avatar
    9095567b
    drm/amdgpu: Fix error handling in amdgpu_ras_add_bad_pages · 9095567b
    SRINIVASAN SHANMUGAM authored
    
    It ensures that appropriate error codes are returned when an error
    condition is detected
    
    Fixes the below;
    drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2849 amdgpu_ras_add_bad_pages() warn: missing error code here? 'amdgpu_umc_pages_in_a_row()' failed.
    drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2884 amdgpu_ras_add_bad_pages() warn: missing error code here? 'amdgpu_ras_mca2pa()' failed.
    
    v2: s/-EIO/-EINVAL, retained the use of -EINVAL from
        amdgpu_umc_pages_in_a_row & and amdgpu_ras_mca2pa_by_idx, when the
        RAS context is not initialized or the convert_ras_err_addr function is
        unavailable. (Thomas)
    
    V3: Returning 0 as the absence of eh_data is acceptable. (Tao)
    
    Fixes: a8d133e6 ("drm/amdgpu: parse legacy RAS bad page mixed with new data in various NPS modes")
    Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
    Cc: YiPeng Chai <yipeng.chai@amd.com>
    Cc: Tao Zhou <tao.zhou1@amd.com>
    Cc: Hawking Zhang <Hawking.Zhang@amd.com>
    Cc: Christian König <christian.koenig@amd.com>
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
    Reviewed-by: default avatarTao Zhou <tao.zhou1@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    9095567b
    History
    drm/amdgpu: Fix error handling in amdgpu_ras_add_bad_pages
    SRINIVASAN SHANMUGAM authored
    
    It ensures that appropriate error codes are returned when an error
    condition is detected
    
    Fixes the below;
    drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2849 amdgpu_ras_add_bad_pages() warn: missing error code here? 'amdgpu_umc_pages_in_a_row()' failed.
    drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2884 amdgpu_ras_add_bad_pages() warn: missing error code here? 'amdgpu_ras_mca2pa()' failed.
    
    v2: s/-EIO/-EINVAL, retained the use of -EINVAL from
        amdgpu_umc_pages_in_a_row & and amdgpu_ras_mca2pa_by_idx, when the
        RAS context is not initialized or the convert_ras_err_addr function is
        unavailable. (Thomas)
    
    V3: Returning 0 as the absence of eh_data is acceptable. (Tao)
    
    Fixes: a8d133e6 ("drm/amdgpu: parse legacy RAS bad page mixed with new data in various NPS modes")
    Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
    Cc: YiPeng Chai <yipeng.chai@amd.com>
    Cc: Tao Zhou <tao.zhou1@amd.com>
    Cc: Hawking Zhang <Hawking.Zhang@amd.com>
    Cc: Christian König <christian.koenig@amd.com>
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
    Reviewed-by: default avatarTao Zhou <tao.zhou1@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>