[Intel-gfx] [PATCH] drm/i915: add support for perf configuration queries

kbuild test robot lkp at intel.com
Wed Jun 6 18:39:16 UTC 2018


Hi Lionel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on next-20180605]
[cannot apply to v4.17]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Lionel-Landwerlin/drm-i915-add-support-for-perf-configuration-queries/20180607-004646
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/i915/i915_query.c:99:14: sparse: incorrect type in argument 1 (different base types) @@    expected void const volatile [noderef] <asn:1>*<noident> @@    got unsvoid const volatile [noderef] <asn:1>*<noident> @@
   drivers/gpu/drm/i915/i915_query.c:99:14:    expected void const volatile [noderef] <asn:1>*<noident>
   drivers/gpu/drm/i915/i915_query.c:99:14:    got unsigned long long [unsigned] [usertype] user_regs_ptr

vim +99 drivers/gpu/drm/i915/i915_query.c

    84	
    85	static int can_copy_perf_config_registers_or_number(u32 user_n_regs,
    86							    u64 user_regs_ptr,
    87							    u32 kernel_n_regs)
    88	{
    89		/*
    90		 * We'll just put the number of registers, and won't copy the
    91		 * register.
    92		 */
    93		if (user_n_regs == 0)
    94			return 0;
    95	
    96		if (user_n_regs < kernel_n_regs)
    97			return -EINVAL;
    98	
  > 99		if (!access_ok(VERIFY_WRITE, user_regs_ptr,
   100			       2 * sizeof(u32) * kernel_n_regs))
   101			return -EFAULT;
   102	
   103		return 0;
   104	}
   105	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


More information about the Intel-gfx mailing list