Skip to contentSkip to conversation

drm/amdgpu: fix compile warning

PATCH In review Alex Xie 2 participants 2 messages Apr 6, 2017 – Apr 7, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Alex Xie

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix compile warning

warning: comparison of distinct pointer types lacks a cast

Change-Id I317eddd1bd430c98a3c50ec170f592f944081a6e
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
index 8785420..cf877df 100644
@@ -1204,7 +1204,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
 	 * reserve space for one command every (1 << BLOCK_SIZE)
 	 *  entries or 2k dwords (whatever is smaller)
 	 */
-	ncmds = (nptes >> min(adev->vm_manager.block_size, 11)) + 1;
+	ncmds = (nptes >> min(adev->vm_manager.block_size, 11u)) + 1;
 
 	/* padding, etc. */
 	ndw = 64;
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): 1491508578-32147-1-git-send-email-AlexBin.Xie-5C7GfCeVMHo@public.gmane.org

#2 lore raw
Quoted 1 line · Alex Xie

warning: comparison of distinct pointer types lacks a cast

Thanks for your patch.
I have fixed it.

Please check in our branch.

Jerry

Quoted 13 lines
Change-Id I317eddd1bd430c98a3c50ec170f592f944081a6e
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0 -0
index 8785420..cf877df 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, · line 1210

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -1
@@ -1204,7 +1204,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
  	 * reserve space for one command every (1 << BLOCK_SIZE)
  	 *  entries or 2k dwords (whatever is smaller)
  	 */
-	ncmds = (nptes >> min(adev->vm_manager.block_size, 11)) + 1;
+	ncmds = (nptes >> min(adev->vm_manager.block_size, 11u)) + 1;
 
  	/* padding, etc. */
  	ndw = 64;

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