[radeon-alex:drm-next-4.12-wip 33/40] drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1222:2: warning: left shift count >= width of type

kbuild test robot fengguang.wu at intel.com
Fri Feb 10 19:32:26 UTC 2017


tree:   git://people.freedesktop.org/~agd5f/linux.git drm-next-4.12-wip
head:   d32ff0ea8e22964abcc6406e00a0646f2bfb94c7
commit: 7958b9959ea9dd544675adebddab255f7c536da7 [33/40] drm/amdgpu: add basic PRT support (v2)
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 7958b9959ea9dd544675adebddab255f7c536da7
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c: In function 'amdgpu_vm_free_mapping':
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1222:2: warning: left shift count >= width of type
     if ((mapping->flags & AMDGPU_PTE_PRT) &&
     ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c: In function 'amdgpu_vm_bo_map':
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1379:2: warning: left shift count >= width of type
     if (flags & AMDGPU_PTE_PRT) {
     ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c: In function 'amdgpu_vm_fini':
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1701:3: warning: left shift count >= width of type
      if (mapping->flags & AMDGPU_PTE_PRT)
      ^

vim +1222 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

  1206	
  1207	/**
  1208	 * amdgpu_vm_free_mapping - free a mapping
  1209	 *
  1210	 * @adev: amdgpu_device pointer
  1211	 * @vm: requested vm
  1212	 * @mapping: mapping to be freed
  1213	 * @fence: fence of the unmap operation
  1214	 *
  1215	 * Free a mapping and make sure we decrease the PRT usage count if applicable.
  1216	 */
  1217	static void amdgpu_vm_free_mapping(struct amdgpu_device *adev,
  1218					   struct amdgpu_vm *vm,
  1219					   struct amdgpu_bo_va_mapping *mapping,
  1220					   struct dma_fence *fence)
  1221	{
> 1222		if ((mapping->flags & AMDGPU_PTE_PRT) &&
  1223		    atomic_dec_return(&adev->vm_manager.num_prt_mappings) == 0) {
  1224			struct amdgpu_prt_cb *cb = kmalloc(sizeof(struct amdgpu_prt_cb),
  1225							   GFP_KERNEL);
  1226	
  1227			cb->adev = adev;
  1228			if (!fence || dma_fence_add_callback(fence, &cb->cb,
  1229							     amdgpu_vm_prt_cb)) {
  1230				amdgpu_vm_update_prt_state(adev);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 48207 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170211/fef4deaf/attachment-0001.gz>


More information about the dri-devel mailing list