drm/amd/amdgpu: cast mem->num_pages to 64-bits when shifting (v2)
authorTom St Denis <tom.stdenis@amd.com>
Fri, 14 Jun 2019 15:47:21 +0000 (11:47 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 Jun 2019 16:32:24 +0000 (11:32 -0500)
commitc1d827d62f71eb6eaa0b2ffad4d893faa99e4c87
tree679895efa8a73ebb81278f758bbfde4ced465822
parentacb05f0a3f6261b330034e14e4d2c6b4bc896504
drm/amd/amdgpu: cast mem->num_pages to 64-bits when shifting (v2)

On 32-bit hosts mem->num_pages is 32-bits and can overflow
when shifted.  Add a cast to avoid this.

(v2): Style fix.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c