Re: [PATCH v2] drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Boris,

[auto build test WARNING on v4.14-rc2]
[also build test WARNING on next-20170929]
[cannot apply to anholt/for-next]
[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/Boris-Brezillon/drm-vc4-Add-the-DRM_IOCTL_VC4_GEM_MADVISE-ioctl/20171005-081733
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:13,
                    from include/asm-generic/bug.h:15,
                    from arch/x86/include/asm/bug.h:81,
                    from include/linux/bug.h:4,
                    from include/linux/scatterlist.h:6,
                    from include/linux/dma-buf.h:29,
                    from drivers/gpu//drm/vc4/vc4_bo.c:22:
   drivers/gpu//drm/vc4/vc4_bo.c: In function 'vc4_bo_stats_dump':
   include/linux/kern_levels.h:4:18: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^~~~~~~~
>> include/drm/drmP.h:150:16: note: in expansion of macro 'KERN_INFO'
      printk##once(KERN_##level "[" DRM_NAME "] " fmt, \
                   ^~~~~
>> include/drm/drmP.h:155:2: note: in expansion of macro '_DRM_PRINTK'
     _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~
>> drivers/gpu//drm/vc4/vc4_bo.c:66:3: note: in expansion of macro 'DRM_INFO'
      DRM_INFO("%30s: %6dkb BOs (%d)\n", "userspace BO cache",
      ^~~~~~~~
   include/linux/kern_levels.h:4:18: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^~~~~~~~
>> include/drm/drmP.h:150:16: note: in expansion of macro 'KERN_INFO'
      printk##once(KERN_##level "[" DRM_NAME "] " fmt, \
                   ^~~~~
>> include/drm/drmP.h:155:2: note: in expansion of macro '_DRM_PRINTK'
     _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~
   drivers/gpu//drm/vc4/vc4_bo.c:70:3: note: in expansion of macro 'DRM_INFO'
      DRM_INFO("%30s: %6dkb BOs (%d)\n", "total purged BO",
      ^~~~~~~~
   drivers/gpu//drm/vc4/vc4_bo.c: In function 'vc4_bo_stats_debugfs':
>> drivers/gpu//drm/vc4/vc4_bo.c:103:26: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
      seq_printf(m, "%30s: %6dkb BOs (%d)\n", "userspace BO cache",
                             ^
   drivers/gpu//drm/vc4/vc4_bo.c:107:26: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
      seq_printf(m, "%30s: %6dkb BOs (%d)\n", "total purged BO",
                             ^
--
   In file included from include/linux/printk.h:6:0,
                    from include/linux/kernel.h:13,
                    from include/asm-generic/bug.h:15,
                    from arch/x86/include/asm/bug.h:81,
                    from include/linux/bug.h:4,
                    from include/linux/scatterlist.h:6,
                    from include/linux/dma-buf.h:29,
                    from drivers/gpu/drm/vc4/vc4_bo.c:22:
   drivers/gpu/drm/vc4/vc4_bo.c: In function 'vc4_bo_stats_dump':
   include/linux/kern_levels.h:4:18: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^~~~~~~~
>> include/drm/drmP.h:150:16: note: in expansion of macro 'KERN_INFO'
      printk##once(KERN_##level "[" DRM_NAME "] " fmt, \
                   ^~~~~
>> include/drm/drmP.h:155:2: note: in expansion of macro '_DRM_PRINTK'
     _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~
   drivers/gpu/drm/vc4/vc4_bo.c:66:3: note: in expansion of macro 'DRM_INFO'
      DRM_INFO("%30s: %6dkb BOs (%d)\n", "userspace BO cache",
      ^~~~~~~~
   include/linux/kern_levels.h:4:18: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t {aka long unsigned int}' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:13:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^~~~~~~~
>> include/drm/drmP.h:150:16: note: in expansion of macro 'KERN_INFO'
      printk##once(KERN_##level "[" DRM_NAME "] " fmt, \
                   ^~~~~
>> include/drm/drmP.h:155:2: note: in expansion of macro '_DRM_PRINTK'
     _DRM_PRINTK(, INFO, fmt, ##__VA_ARGS__)
     ^~~~~~~~~~~
   drivers/gpu/drm/vc4/vc4_bo.c:70:3: note: in expansion of macro 'DRM_INFO'
      DRM_INFO("%30s: %6dkb BOs (%d)\n", "total purged BO",
      ^~~~~~~~
   drivers/gpu/drm/vc4/vc4_bo.c: In function 'vc4_bo_stats_debugfs':
   drivers/gpu/drm/vc4/vc4_bo.c:103:26: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
      seq_printf(m, "%30s: %6dkb BOs (%d)\n", "userspace BO cache",
                             ^
   drivers/gpu/drm/vc4/vc4_bo.c:107:26: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t {aka long unsigned int}' [-Wformat=]
      seq_printf(m, "%30s: %6dkb BOs (%d)\n", "total purged BO",
                             ^

vim +/DRM_INFO +66 drivers/gpu//drm/vc4/vc4_bo.c

    42	
    43	static void vc4_bo_stats_dump(struct vc4_dev *vc4)
    44	{
    45		size_t purgeable_size, purged_size;
    46		int i, npurgeable, npurged;
    47	
    48		for (i = 0; i < vc4->num_labels; i++) {
    49			if (!vc4->bo_labels[i].num_allocated)
    50				continue;
    51	
    52			DRM_INFO("%30s: %6dkb BOs (%d)\n",
    53				 vc4->bo_labels[i].name,
    54				 vc4->bo_labels[i].size_allocated / 1024,
    55				 vc4->bo_labels[i].num_allocated);
    56		}
    57	
    58		mutex_lock(&vc4->purgeable.lock);
    59		npurgeable = vc4->purgeable.num;
    60		purgeable_size = vc4->purgeable.size;
    61		purged_size = vc4->purgeable.purged_size;
    62		npurged = vc4->purgeable.purged_num;
    63		mutex_unlock(&vc4->purgeable.lock);
    64	
    65		if (npurgeable)
  > 66			DRM_INFO("%30s: %6dkb BOs (%d)\n", "userspace BO cache",
    67				 purgeable_size / 1024, npurgeable);
    68	
    69		if (npurged)
  > 70			DRM_INFO("%30s: %6dkb BOs (%d)\n", "total purged BO",
    71				 purged_size / 1024, npurged);
    72	}
    73	
    74	#ifdef CONFIG_DEBUG_FS
    75	int vc4_bo_stats_debugfs(struct seq_file *m, void *unused)
    76	{
    77		struct drm_info_node *node = (struct drm_info_node *)m->private;
    78		struct drm_device *dev = node->minor->dev;
    79		struct vc4_dev *vc4 = to_vc4_dev(dev);
    80		size_t purgeable_size, purged_size;
    81		int i, npurgeable, npurged;
    82	
    83		mutex_lock(&vc4->bo_lock);
    84		for (i = 0; i < vc4->num_labels; i++) {
    85			if (!vc4->bo_labels[i].num_allocated)
    86				continue;
    87	
    88			seq_printf(m, "%30s: %6dkb BOs (%d)\n",
    89				   vc4->bo_labels[i].name,
    90				   vc4->bo_labels[i].size_allocated / 1024,
    91				   vc4->bo_labels[i].num_allocated);
    92		}
    93		mutex_unlock(&vc4->bo_lock);
    94	
    95		mutex_lock(&vc4->purgeable.lock);
    96		npurgeable = vc4->purgeable.num;
    97		purgeable_size = vc4->purgeable.size;
    98		purged_size = vc4->purgeable.purged_size;
    99		npurged = vc4->purgeable.purged_num;
   100		mutex_unlock(&vc4->purgeable.lock);
   101	
   102		if (npurgeable)
 > 103			seq_printf(m, "%30s: %6dkb BOs (%d)\n", "userspace BO cache",
   104				   purgeable_size / 1024, npurgeable);
   105	
   106		if (npurged)
   107			seq_printf(m, "%30s: %6dkb BOs (%d)\n", "total purged BO",
   108				   purged_size / 1024, npurged);
   109	
   110		return 0;
   111	}
   112	#endif
   113	

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux