CC: kbuild-...@lists.01.org
BCC: l...@intel.com
In-Reply-To: <20220707102453.3633-5-christian.koe...@amd.com>
References: <20220707102453.3633-5-christian.koe...@amd.com>
TO: "Christian König" <ckoenig.leichtzumer...@gmail.com>
TO: intel-...@lists.freedesktop.org
TO: dri-de...@lists.freedesktop.org
TO: nouv...@lists.freedesktop.org
TO: amd-...@lists.freedesktop.org
CC: "Christian König" <christian.koe...@amd.com>

Hi "Christian,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]

url:    
https://github.com/intel-lab-lkp/linux/commits/Christian-K-nig/drm-ttm-rename-and-cleanup-ttm_bo_init_reserved/20220707-192538
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: i386-randconfig-m021 
(https://download.01.org/0day-ci/archive/20220711/202207111026.8yp48spg-...@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <l...@intel.com>
Reported-by: Dan Carpenter <dan.carpen...@oracle.com>

New smatch warnings:
drivers/gpu/drm/ttm/ttm_bo.c:915 ttm_bo_validate() error: we previously assumed 
'bo->resource' could be null (see line 907)

Old smatch warnings:
drivers/gpu/drm/ttm/ttm_bo.c:672 ttm_mem_evict_first() warn: inconsistent 
returns '&bdev->lru_lock'.

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

ba4e7d973dd09b Thomas Hellstrom 2009-06-10  889  
09855acb1c2e37 Jerome Glisse    2009-12-10  890  int ttm_bo_validate(struct 
ttm_buffer_object *bo,
ca262a9998d461 Jerome Glisse    2009-12-08  891                     struct 
ttm_placement *placement,
19be5570107108 Christian König  2017-04-12  892                     struct 
ttm_operation_ctx *ctx)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  893  {
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  894         int ret;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  895  
52791eeec1d9f4 Christian König  2019-08-11  896         
dma_resv_assert_held(bo->base.resv);
d2588d2ded0f3a Christian König  2018-03-15  897  
d2588d2ded0f3a Christian König  2018-03-15  898         /*
d2588d2ded0f3a Christian König  2018-03-15  899          * Remove the backing 
store if no placement is given.
d2588d2ded0f3a Christian König  2018-03-15  900          */
a3be8cd70fec2a Thomas Hellström 2021-06-02  901         if 
(!placement->num_placement && !placement->num_busy_placement)
a3be8cd70fec2a Thomas Hellström 2021-06-02  902                 return 
ttm_bo_pipeline_gutting(bo);
d2588d2ded0f3a Christian König  2018-03-15  903  
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  904         /*
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  905          * Check whether we 
need to move buffer.
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  906          */
dafc2f46058f06 Christian König  2022-07-07 @907         if (!bo->resource || 
!ttm_resource_compat(bo->resource, placement)) {
83876c1bed8c91 Christian König  2017-04-12  908                 ret = 
ttm_bo_move_buffer(bo, placement, ctx);
ca262a9998d461 Jerome Glisse    2009-12-08  909                 if (ret)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  910                         return 
ret;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  911         }
62975d27d647a4 Christian König  2020-08-12  912         /*
62975d27d647a4 Christian König  2020-08-12  913          * We might need to add 
a TTM.
62975d27d647a4 Christian König  2020-08-12  914          */
d3116756a710e3 Christian König  2021-04-12 @915         if 
(bo->resource->mem_type == TTM_PL_SYSTEM) {
62975d27d647a4 Christian König  2020-08-12  916                 ret = 
ttm_tt_create(bo, true);
62975d27d647a4 Christian König  2020-08-12  917                 if (ret)
62975d27d647a4 Christian König  2020-08-12  918                         return 
ret;
62975d27d647a4 Christian König  2020-08-12  919         }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  920         return 0;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  921  }
09855acb1c2e37 Jerome Glisse    2009-12-10  922  EXPORT_SYMBOL(ttm_bo_validate);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10  923  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to