Skip to content
Commit 1e12c16d authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer
Browse files

amdgpu: Use uint32_t i in amdgpu_find_bo_by_cpu_mapping



The compiler points out that an int doesn't work as intended if
dev->bo_handles.max_key > INT_MAX:

../../amdgpu/amdgpu_bo.c: In function ‘amdgpu_find_bo_by_cpu_mapping’:
../../amdgpu/amdgpu_bo.c:550:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
  for (i = 0; i < dev->bo_handles.max_key; i++) {
                ^
../../amdgpu/amdgpu_bo.c:558:8: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
  if (i < dev->bo_handles.max_key) {
        ^

Fixes: 4d454424 ("amdgpu: add a function to find bo by cpu mapping
                     (v2)")
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarJunwei Zhang <Jerry.Zhang@amd.com>
parent 6e300317
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment