llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [weiny2:dcd-2024-03-10 7/26] drivers/cxl/core/hdm.c:445:3: error: expected expression
@ 2024-03-11  9:54 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-11  9:54 UTC (permalink / raw)
  To: Navneet Singh; +Cc: llvm, oe-kbuild-all, Ira Weiny

tree:   https://github.com/weiny2/linux-kernel.git dcd-2024-03-10
head:   0dd99bd79b33de8f6e293c9a2373ca321dad33c7
commit: 97663934fa1a6024e94de32c480cece7039db3a1 [7/26] cxl/port: Add Dynamic Capacity mode support to endpoint decoders
config: i386-buildonly-randconfig-001-20240311 (https://download.01.org/0day-ci/archive/20240311/202403111726.SaRLpSrS-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240311/202403111726.SaRLpSrS-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403111726.SaRLpSrS-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/cxl/core/hdm.c:445:3: error: expected expression
     445 |                 int rc;
         |                 ^
>> drivers/cxl/core/hdm.c:447:3: error: use of undeclared identifier 'rc'
     447 |                 rc = dc_mode_to_region_index(mode);
         |                 ^
   drivers/cxl/core/hdm.c:448:7: error: use of undeclared identifier 'rc'
     448 |                 if (rc < 0)
         |                     ^
   drivers/cxl/core/hdm.c:449:11: error: use of undeclared identifier 'rc'
     449 |                         return rc;
         |                                ^
   drivers/cxl/core/hdm.c:451:36: error: use of undeclared identifier 'rc'
     451 |                 if (resource_size(&cxlds->dc_res[rc]) == 0) {
         |                                                  ^
   5 errors generated.


vim +445 drivers/cxl/core/hdm.c

   415	
   416	int cxl_dpa_set_mode(struct cxl_endpoint_decoder *cxled,
   417			     enum cxl_decoder_mode mode)
   418	{
   419		struct cxl_memdev *cxlmd = cxled_to_memdev(cxled);
   420		struct cxl_dev_state *cxlds = cxlmd->cxlds;
   421		struct device *dev = &cxled->cxld.dev;
   422	
   423		guard(rwsem_write)(&cxl_dpa_rwsem);
   424		if (cxled->cxld.flags & CXL_DECODER_F_ENABLE)
   425			return -EBUSY;
   426	
   427		/*
   428		 * Check that the mode is supported by the current partition
   429		 * configuration
   430		 */
   431		switch (mode) {
   432		case CXL_DECODER_RAM:
   433			if (!resource_size(&cxlds->ram_res)) {
   434				dev_dbg(dev, "no available ram capacity\n");
   435				return -ENXIO;
   436			}
   437			break;
   438		case CXL_DECODER_PMEM:
   439			if (!resource_size(&cxlds->pmem_res)) {
   440				dev_dbg(dev, "no available pmem capacity\n");
   441				return -ENXIO;
   442			}
   443			break;
   444		case CXL_DECODER_DC0 ... CXL_DECODER_DC7:
 > 445			int rc;
   446	
 > 447			rc = dc_mode_to_region_index(mode);
   448			if (rc < 0)
   449				return rc;
   450	
   451			if (resource_size(&cxlds->dc_res[rc]) == 0) {
   452				dev_dbg(dev, "no available dynamic capacity\n");
   453				return -ENXIO;
   454			}
   455			break;
   456		default:
   457			dev_dbg(dev, "unsupported mode: %d\n", mode);
   458			return -EINVAL;
   459		}
   460	
   461		cxled->mode = mode;
   462		return 0;
   463	}
   464	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-11  9:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-11  9:54 [weiny2:dcd-2024-03-10 7/26] drivers/cxl/core/hdm.c:445:3: error: expected expression kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).