drm/amdgpu: Off by one sanity checks
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 11 Jul 2017 19:53:29 +0000 (22:53 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jul 2017 15:06:40 +0000 (11:06 -0400)
commit1d11ee89862ae7c1932e8b742fbb8340598f8874
tree8eeefcdb8e4241e50315b892be5e472fffde1d9f
parent6d949d247379ec92e1a0642fc7a227284488360e
drm/amdgpu: Off by one sanity checks

This is just future proofing code, not something that can be triggered
in real life.  We're testing to make sure we don't shift wrap when we
do "1ull << i" so "i" has to be in the 0-63 range.  If it's 64 then we
have gone too far.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c