[drm-xe:drm-xe-next 6/7] drivers/gpu/drm/xe/xe_pt.c:931:73: sparse: sparse: Using plain integer as NULL pointer

kernel test robot lkp at intel.com
Fri Jul 5 11:17:01 UTC 2024


tree:   https://gitlab.freedesktop.org/drm/xe/kernel.git drm-xe-next
head:   c55f79f317ab428ae6d005965bc07e37496f209f
commit: a708f6501c692551e3d4ea618c44021f436730d9 [6/7] drm/xe: Update PT layer with better error handling
config: openrisc-randconfig-r123-20240705 (https://download.01.org/0day-ci/archive/20240705/202407051904.cZVyDRlA-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240705/202407051904.cZVyDRlA-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407051904.cZVyDRlA-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/xe/xe_pt.c:931:73: sparse: sparse: Using plain integer as NULL pointer
   drivers/gpu/drm/xe/xe_pt.c: note: in included file (through include/linux/smp.h, include/linux/lockdep.h, include/linux/spinlock.h, ...):
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true

vim +931 drivers/gpu/drm/xe/xe_pt.c

   906	
   907	static void xe_pt_abort_bind(struct xe_vma *vma,
   908				     struct xe_vm_pgtable_update *entries,
   909				     u32 num_entries, bool rebind)
   910	{
   911		int i, j;
   912	
   913		xe_pt_commit_locks_assert(vma);
   914	
   915		for (i = num_entries - 1; i >= 0; --i) {
   916			struct xe_pt *pt = entries[i].pt;
   917			struct xe_pt_dir *pt_dir;
   918	
   919			if (!rebind)
   920				pt->num_live -= entries[i].qwords;
   921	
   922			if (!pt->level)
   923				continue;
   924	
   925			pt_dir = as_xe_pt_dir(pt);
   926			for (j = 0; j < entries[i].qwords; j++) {
   927				u32 j_ = j + entries[i].ofs;
   928				struct xe_pt *newpte = xe_pt_entry(pt_dir, j_);
   929				struct xe_pt *oldpte = entries[i].pt_entries[j].pt;
   930	
 > 931				pt_dir->children[j_] = oldpte ? &oldpte->base : 0;
   932				xe_pt_destroy(newpte, xe_vma_vm(vma)->flags, NULL);
   933			}
   934		}
   935	}
   936	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


More information about the Intel-xe mailing list