Re: [PATCH] drm/ttm: cleanup BO size handling v2

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

 



Hi "Christian,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on next-20201209]
[cannot apply to drm-exynos/exynos-drm-next drm-intel/for-linux-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.10-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Christian-K-nig/drm-ttm-cleanup-BO-size-handling-v2/20201209-221144
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-a012-20201209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/d00372c14267d592b785c5d0c72ec167d48ade73
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Christian-K-nig/drm-ttm-cleanup-BO-size-handling-v2/20201209-221144
        git checkout d00372c14267d592b785c5d0c72ec167d48ade73
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/ttm/ttm_bo.c: In function 'ttm_bo_mem_space_debug':
>> drivers/gpu/drm/ttm/ttm_bo.c:75:48: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      75 |  drm_printf(&p, "No space for %p (%lu pages, %luK, %luM)\n",
         |                                              ~~^
         |                                                |
         |                                                long unsigned int
         |                                              %u
      76 |      bo, bo->mem.num_pages, bo->base.size >> 10,
         |                             ~~~~~~~~~~~~~~~~~~~ 
         |                                           |
         |                                           size_t {aka unsigned int}
   drivers/gpu/drm/ttm/ttm_bo.c:75:54: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
      75 |  drm_printf(&p, "No space for %p (%lu pages, %luK, %luM)\n",
         |                                                    ~~^
         |                                                      |
         |                                                      long unsigned int
         |                                                    %u
      76 |      bo, bo->mem.num_pages, bo->base.size >> 10,
      77 |      bo->base.size >> 20);
         |      ~~~~~~~~~~~~~~~~~~~                              
         |                    |
         |                    size_t {aka unsigned int}

vim +75 drivers/gpu/drm/ttm/ttm_bo.c

420457acfb3060 Tom St Denis    2018-01-24  67  
fb53f8621a3fab Jerome Glisse   2009-12-09  68  static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo,
fb53f8621a3fab Jerome Glisse   2009-12-09  69  					struct ttm_placement *placement)
fb53f8621a3fab Jerome Glisse   2009-12-09  70  {
0f6be2c09af65a Michel Dänzer   2018-11-30  71  	struct drm_printer p = drm_debug_printer(TTM_PFX);
9de59bc201496f Dave Airlie     2020-08-04  72  	struct ttm_resource_manager *man;
48e07c23cbeba2 Christian König 2020-09-10  73  	int i, mem_type;
fb53f8621a3fab Jerome Glisse   2009-12-09  74  
0f6be2c09af65a Michel Dänzer   2018-11-30 @75  	drm_printf(&p, "No space for %p (%lu pages, %luK, %luM)\n",
d00372c14267d5 Christian König 2020-12-09  76  		   bo, bo->mem.num_pages, bo->base.size >> 10,
d00372c14267d5 Christian König 2020-12-09  77  		   bo->base.size >> 20);
fb53f8621a3fab Jerome Glisse   2009-12-09  78  	for (i = 0; i < placement->num_placement; i++) {
48e07c23cbeba2 Christian König 2020-09-10  79  		mem_type = placement->placement[i].mem_type;
0f6be2c09af65a Michel Dänzer   2018-11-30  80  		drm_printf(&p, "  placement[%d]=0x%08X (%d)\n",
f1217ed09f827e Christian König 2014-08-27  81  			   i, placement->placement[i].flags, mem_type);
9eca33f4a13919 Dave Airlie     2020-08-04  82  		man = ttm_manager_type(bo->bdev, mem_type);
9de59bc201496f Dave Airlie     2020-08-04  83  		ttm_resource_manager_debug(man, &p);
fb53f8621a3fab Jerome Glisse   2009-12-09  84  	}
fb53f8621a3fab Jerome Glisse   2009-12-09  85  }
fb53f8621a3fab Jerome Glisse   2009-12-09  86  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

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