[PATCH v8 2/2] staging/android: refactor SYNC IOCTLs

kbuild test robot lkp at intel.com
Tue Mar 15 09:26:19 UTC 2016


Hi Gustavo,

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on next-20160315]
[cannot apply to v4.5]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Gustavo-Padovan/staging-android-remove-redundant-comments-on-sync_merge_data/20160315-051123
config: i386-randconfig-h1-03151610 (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/linkage.h:4:0,
                    from include/linux/fs.h:4,
                    from include/linux/debugfs.h:18,
                    from drivers/staging/android/sync.c:17:
   drivers/staging/android/sync.c: In function 'sync_file_ioctl_fence_info':
   drivers/staging/android/sync.c:535:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     if (copy_to_user((void __user *)info.sync_fence_info, fence_info,
                      ^
   include/linux/compiler.h:147:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^
>> drivers/staging/android/sync.c:535:2: note: in expansion of macro 'if'
     if (copy_to_user((void __user *)info.sync_fence_info, fence_info,
     ^
   drivers/staging/android/sync.c:535:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     if (copy_to_user((void __user *)info.sync_fence_info, fence_info,
                      ^
   include/linux/compiler.h:147:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^
>> drivers/staging/android/sync.c:535:2: note: in expansion of macro 'if'
     if (copy_to_user((void __user *)info.sync_fence_info, fence_info,
     ^
   drivers/staging/android/sync.c:535:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     if (copy_to_user((void __user *)info.sync_fence_info, fence_info,
                      ^
   include/linux/compiler.h:158:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
>> drivers/staging/android/sync.c:535:2: note: in expansion of macro 'if'
     if (copy_to_user((void __user *)info.sync_fence_info, fence_info,
     ^

vim +/if +535 drivers/staging/android/sync.c

   519		 * info->num_fences.
   520		 */
   521		if (!info.num_fences)
   522			goto no_fences;
   523	
   524		if (info.num_fences < sync_file->num_fences)
   525			return -EINVAL;
   526	
   527		size = sync_file->num_fences * sizeof(*fence_info);
   528		fence_info = kzalloc(size, GFP_KERNEL);
   529		if (!fence_info)
   530			return -ENOMEM;
   531	
   532		for (i = 0; i < sync_file->num_fences; ++i)
   533			sync_fill_fence_info(sync_file->cbs[i].fence, &fence_info[i]);
   534	
 > 535		if (copy_to_user((void __user *)info.sync_fence_info, fence_info,
   536				 size)) {
   537			ret = -EFAULT;
   538			goto out;
   539		}
   540	
   541	no_fences:
   542		strlcpy(info.name, sync_file->name, sizeof(info.name));
   543		info.status = atomic_read(&sync_file->status);

---
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/octet-stream
Size: 22770 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160315/3a543175/attachment-0001.obj>


More information about the dri-devel mailing list