[PATCH] drm/amdgpu: fix amdgpu_vm warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> å?¨ 2017å¹´4æ??6æ?¥ï¼?22:03ï¼?Christian König <deathsimple at vodafone.de> å??é??ï¼?
> 
> Am 06.04.2017 um 16:06 schrieb Junwei Zhang:
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c: In function
>> 'amdgpu_vm_bo_update_mapping':
>>>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1207:20: warning:
>> comparison of distinct pointer types lacks a cast [enabled by default]
>> 
>> Signed-off-by: Junwei Zhang <Jerry.Zhang at 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 bc2650ef..2209a6a 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, (uint32_t)11)) + 1;
> 
> Writing this as "11u" should be sufficient as well and is more convenient.

Good point.
Will update.

Jerry

> 
> With that fixed Reviewed-by: Christian König <christian.koenig at amd.com>.
> 
> Regards,
> Christian.
> 
>>    	/* padding, etc. */
>>  	ndw = 64;
> 
> 



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux