[PATCH] drm/amdgpu: cleanup creating BOs at fixed location

Christian König ckoenig.leichtzumerken at gmail.com
Tue Sep 17 08:10:51 UTC 2019


Am 16.09.19 um 22:06 schrieb Li, Sun peng (Leo):
>
> On 2019-09-13 8:08 a.m., Christian König wrote:
>> [SNIP]
>> -		if (amdgpu_ras_reserve_vram(adev, bp << PAGE_SHIFT,
>> -					PAGE_SIZE, &bo))
>> +		if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SIZE, PAGE_SIZE,
> I'm getting a compile warning from the above line:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1408:43: warning: left shift count >= width of type [-Wshift-count-overflow]
>   1408 |   if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SIZE, PAGE_SIZE,
>        |                                           ^~
>
> Should it be << PAGE_SHIFT?

Yeah, Alex already fixed that up yesterday. Sorry that I didn't noticed 
all those typos earlier, but I don't have hardware to test this.

Christian.

>
> Thanks,
> Leo
>



More information about the amd-gfx mailing list