Skip to contentSkip to conversation

drm/amdgpu: fix compile warning in amdgpu_kms.c

PATCH In review Rex Zhu 2 participants 2 messages Jan 2, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

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

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

Change-Id Ib77eac5b15d09d169d2e95cff7608b395fb0f64c
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -1
index 3273d8c..47bc8e1 100644
@@ -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:
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1483349019-28373-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 02.01.2017 um 10:23 schrieb Rex Zhu:

Quoted 6 lines

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

Change-Id Ib77eac5b15d09d169d2e95cff7608b395fb0f64c
Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0 -0
index 3273d8c..47bc8e1 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file · line 567

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1 -1
@@ -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:

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx