[PATCH] drm/amdgpu: fix compile warning in amdgpu_kms.c

Rex Zhu Rex.Zhu at amd.com
Mon Jan 2 09:23:39 UTC 2017


warning:
comparison of distinct pointer types lacks a cast
 min((size_t)size, bios_size - bios_offset))

Change-Id: Ib77eac5b15d09d169d2e95cff7608b395fb0f64c
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 3273d8c..47bc8e1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -561,7 +561,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
 
 			bios = adev->bios + bios_offset;
 			return copy_to_user(out, bios,
-				min((size_t)size, bios_size - bios_offset))
+				min(size, bios_size - bios_offset))
 					? -EFAULT : 0;
 		}
 		default:
-- 
1.9.1



More information about the amd-gfx mailing list