• L
    drm/amdgpu: Return error if no RAS · 4d9f771e
    Luben Tuikov 提交于
    In amdgpu_ras_query_error_count() return an error
    if the device doesn't support RAS. This prevents
    that function from having to always set the values
    of the integer pointers (if set), and thus
    prevents function side effects--always to have to
    set values of integers if integer pointers set,
    regardless of whether RAS is supported or
    not--with this change this side effect is
    mitigated.
    
    Also, if no pointers are set, don't count, since
    we've no way of reporting the counts.
    
    Also, give this function a kernel-doc.
    
    Cc: Alexander Deucher <Alexander.Deucher@amd.com>
    Cc: John Clements <john.clements@amd.com>
    Cc: Hawking Zhang <Hawking.Zhang@amd.com>
    Reported-by: NTom Rix <trix@redhat.com>
    Fixes: a46751fb ("drm/amdgpu: Fix RAS function interface")
    Signed-off-by: NLuben Tuikov <luben.tuikov@amd.com>
    Reviewed-by: NAlexander Deucher <Alexander.Deucher@amd.com>
    Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
    4d9f771e
amdgpu_ras.h 19.1 KB