drm/amdgpu: Fix inconsistent of format with argument type in amdgpu_xgmi.c
authorYe Bin <yebin10@huawei.com>
Fri, 9 Oct 2020 07:47:58 +0000 (15:47 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Oct 2020 18:51:15 +0000 (14:51 -0400)
Fix follow warning:
[drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:249]: (warning) %d in format
string (no. 1) requires 'int' but the argument type is 'unsigned int'.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c

index 1162913..54c358e 100644 (file)
@@ -246,7 +246,7 @@ static ssize_t amdgpu_xgmi_show_error(struct device *dev,
 
        adev->df.funcs->set_fica(adev, ficaa_pie_status_in, 0, 0);
 
-       return snprintf(buf, PAGE_SIZE, "%d\n", error_count);
+       return snprintf(buf, PAGE_SIZE, "%u\n", error_count);
 }