drm/amdgpu: fix compile warning

Submitted by Xie, AlexBin on April 6, 2017, 7:56 p.m.

Details

Message ID 1491508578-32147-1-git-send-email-AlexBin.Xie@amd.com
State New
Headers show
Series "drm/amdgpu: fix compile warning" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Xie, AlexBin April 6, 2017, 7:56 p.m.
warning: comparison of distinct pointer types lacks a cast

Change-Id: I317eddd1bd430c98a3c50ec170f592f944081a6e
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 8785420..cf877df 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -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;

Comments

On 04/07/2017 03:56 AM, Alex Xie wrote:
> warning: comparison of distinct pointer types lacks a cast

Thanks for your patch.
I have fixed it.

Please check in our branch.

Jerry
>
> Change-Id: I317eddd1bd430c98a3c50ec170f592f944081a6e
> Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 8785420..cf877df 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -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;
>