CC: [email protected]
BCC: [email protected]
CC: Alison Schofield <[email protected]>
CC: Vishal Verma <[email protected]>
CC: Ira Weiny <[email protected]>
CC: Ben Widawsky <[email protected]>
CC: Dan Williams <[email protected]>
TO: Dan Williams <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git preview
head:   1985cf58850562e4b960e19d46f0d8f19d6c7cbd
commit: 00f2da5084b78ec176b8bff9d22e3bf6a0e5a821 [42/51] cxl/region: Allocate 
host physical address (HPA) capacity to new regions
:::::: branch date: 7 days ago
:::::: commit date: 8 days ago
config: i386-randconfig-m021 
(https://download.01.org/0day-ci/archive/20220702/[email protected]/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 <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
drivers/cxl/core/port.c:327 cxl_root_decoder_visible() error: we previously 
assumed 'a' could be null (see line 324)

Old smatch warnings:
drivers/cxl/core/port.c:1498 cxl_decoder_alloc() error: potentially 
dereferencing uninitialized 'cxld'.

vim +/a +327 drivers/cxl/core/port.c

c852150450ee6c Ben Widawsky 2021-06-08  315  
c852150450ee6c Ben Widawsky 2021-06-08  316  static umode_t 
cxl_root_decoder_visible(struct kobject *kobj, struct attribute *a, int n)
c852150450ee6c Ben Widawsky 2021-06-08  317  {
c852150450ee6c Ben Widawsky 2021-06-08  318     struct device *dev = 
kobj_to_dev(kobj);
c852150450ee6c Ben Widawsky 2021-06-08  319     struct cxl_root_decoder *cxlrd 
= to_cxl_root_decoder(dev);
c852150450ee6c Ben Widawsky 2021-06-08  320  
c852150450ee6c Ben Widawsky 2021-06-08  321     if (a == 
CXL_REGION_ATTR(create_pmem_region) && !can_create_pmem(cxlrd))
c852150450ee6c Ben Widawsky 2021-06-08  322             return 0;
c852150450ee6c Ben Widawsky 2021-06-08  323  
c852150450ee6c Ben Widawsky 2021-06-08 @324     if (a == 
CXL_REGION_ATTR(delete_region) && !can_create_pmem(cxlrd))
c852150450ee6c Ben Widawsky 2021-06-08  325             return 0;
c852150450ee6c Ben Widawsky 2021-06-08  326  
c852150450ee6c Ben Widawsky 2021-06-08 @327     return a->mode;
c852150450ee6c Ben Widawsky 2021-06-08  328  }
c852150450ee6c Ben Widawsky 2021-06-08  329  

:::::: The code at line 327 was first introduced by commit
:::::: c852150450ee6ceb082faad5d41fa8632389ffee cxl/region: Add region creation 
support

:::::: TO: Ben Widawsky <[email protected]>
:::::: CC: Dan Williams <[email protected]>

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

Reply via email to