Hi "Christian,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next 
tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.12-rc3 next-20210315]
[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-move-swapout-logic-around/20210316-000551
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-s002-20210315 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-277-gc089cd2d-dirty
        # 
https://github.com/0day-ci/linux/commit/70ae63f3a85b9791dfcf38034c304aedda122e7b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
Christian-K-nig/drm-ttm-move-swapout-logic-around/20210316-000551
        git checkout 70ae63f3a85b9791dfcf38034c304aedda122e7b
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>


"sparse warnings: (new ones prefixed by >>)"
   drivers/gpu/drm/ttm/ttm_device.c:42:1: sparse: sparse: symbol 
'ttm_global_mutex' was not declared. Should it be static?
   drivers/gpu/drm/ttm/ttm_device.c:43:10: sparse: sparse: symbol 
'ttm_glob_use_count' was not declared. Should it be static?
>> drivers/gpu/drm/ttm/ttm_device.c:125:6: sparse: sparse: context imbalance in 
>> 'ttm_device_swapout' - wrong count at exit

vim +/ttm_device_swapout +125 drivers/gpu/drm/ttm/ttm_device.c

   124  
 > 125  long ttm_device_swapout(struct ttm_device *bdev, struct 
 > ttm_operation_ctx *ctx,
   126                          gfp_t gfp_flags)
   127  {
   128          struct ttm_global *glob = &ttm_glob;
   129          struct ttm_resource_manager *man;
   130          struct ttm_buffer_object *bo;
   131          unsigned i, j;
   132          int ret;
   133  
   134          spin_lock(&glob->lru_lock);
   135          for (i = TTM_PL_SYSTEM; i < TTM_NUM_MEM_TYPES; ++i) {
   136                  man = ttm_manager_type(bdev, i);
   137                  if (!man || !man->use_tt)
   138                          continue;
   139  
   140                  for (j = 0; j < TTM_MAX_BO_PRIORITY; ++j) {
   141                          list_for_each_entry(bo, &man->lru[j], lru) {
   142                                  long num_pages;
   143  
   144                                  if (!bo->ttm ||
   145                                      bo->ttm->page_flags & 
TTM_PAGE_FLAG_SG ||
   146                                      bo->ttm->page_flags & 
TTM_PAGE_FLAG_SWAPPED)
   147                                          continue;
   148  
   149                                  num_pages = bo->ttm->num_pages;
   150                                  ret = ttm_bo_swapout(bo, ctx, 
gfp_flags);
   151                                  /* ttm_bo_swapout has dropped the 
lru_lock */
   152                                  if (!ret)
   153                                          return num_pages;
   154                                  if (ret != -EBUSY)
   155                                          return ret;
   156                          }
   157                  }
   158          }
   159          spin_unlock(&glob->lru_lock);
   160          return 0;
   161  }
   162  EXPORT_SYMBOL(ttm_device_swapout);
   163  

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

Attachment: .config.gz
Description: application/gzip

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

Reply via email to