[radeon-alex:drm-next-4.12-wip 34/69] drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1207:27: sparse: incompatible types in comparison expression (different signedness)
kbuild test robot
fengguang.wu at intel.com
Thu Apr 6 07:07:32 UTC 2017
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.12-wip
head: a738ad6108435367c1d7f1a4a499bebdd26c375e
commit: d088e5038a6387552501705c797c0d0b84d3a935 [34/69] drm/amdgpu: fix vm size and block size for VMPT (v4)
reproduce:
# apt-get install sparse
git checkout d088e5038a6387552501705c797c0d0b84d3a935
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
include/linux/compiler.h:264:8: sparse: attribute 'no_sanitize_address': unknown attribute
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1207:27: sparse: incompatible types in comparison expression (different signedness)
In file included from include/linux/list.h:8:0,
from include/linux/wait.h:6,
from include/linux/dma-fence.h:25,
from include/linux/dma-fence-array.h:23,
from drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:28:
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c: In function 'amdgpu_vm_bo_update_mapping':
include/linux/kernel.h:755:16: warning: comparison of distinct pointer types lacks a cast
(void) (&min1 == &min2); \
^
include/linux/kernel.h:758:2: note: in expansion of macro '__min'
__min(typeof(x), typeof(y), \
^~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1207:20: note: in expansion of macro 'min'
ncmds = (nptes >> min(adev->vm_manager.block_size, 11)) + 1;
^~~
vim +1207 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
1191 params.adev = adev;
1192 params.vm = vm;
1193 params.src = src;
1194
1195 ring = container_of(vm->entity.sched, struct amdgpu_ring, sched);
1196
1197 /* sync to everything on unmapping */
1198 if (!(flags & AMDGPU_PTE_VALID))
1199 owner = AMDGPU_FENCE_OWNER_UNDEFINED;
1200
1201 nptes = last - start + 1;
1202
1203 /*
1204 * reserve space for one command every (1 << BLOCK_SIZE)
1205 * entries or 2k dwords (whatever is smaller)
1206 */
> 1207 ncmds = (nptes >> min(adev->vm_manager.block_size, 11)) + 1;
1208
1209 /* padding, etc. */
1210 ndw = 64;
1211
1212 if (src) {
1213 /* only copy commands needed */
1214 ndw += ncmds * 7;
1215
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
More information about the dri-devel
mailing list