• Nicolai Hähnle's avatar
    drm/ttm: make TTM_MAX_BO_PRIORITY unsigned · 5187b6cd
    Nicolai Hähnle authored
    Fix a warning about different types in min() macro in amdgpu:
    
    In file included from ./include/linux/list.h:8:0,
                     from drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:32:
    drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: In function ‘amdgpu_bo_create_restricted’:
    ./include/linux/kernel.h:739:16: warning: comparison of distinct pointer types lacks a cast
      (void) (&min1 == &min2);   \
                    ^
    ./include/linux/kernel.h:742:2: note: in expansion of macro ‘__min’
      __min(typeof(x), typeof(y),   \
      ^~~~~
    drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:434:21: note: in expansion of macro ‘min’
      bo->tbo.priority = min(bo->tbo.priority, TTM_MAX_BO_PRIORITY - 1);
                         ^~~
    Signed-off-by: default avatarNicolai Hähnle <nicolai.haehnle@amd.com>
    Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    5187b6cd
ttm_bo_driver.h 33.3 KB