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: warning: label followed by a declaration is a C23 extension
@ 2024-03-11 10:38 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-11 10:38 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: arm-randconfig-001-20240311 (https://download.01.org/0day-ci/archive/20240311/202403111859.6reDudoo-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 503c55e17037436dcd45ac69dea8967e67e3f5e8)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240311/202403111859.6reDudoo-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/202403111859.6reDudoo-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/cxl/core/hdm.c:7:
   In file included from drivers/cxl/cxlmem.h:11:
   In file included from drivers/cxl/cxl.h:7:
   In file included from include/linux/libnvdimm.h:14:
   In file included from include/linux/bio.h:10:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/arm/include/asm/cacheflush.h:10:
   In file included from include/linux/mm.h:2188:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/cxl/core/hdm.c:445:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
     445 |                 int rc;
         |                 ^
   2 warnings 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 10:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-11 10:38 [weiny2:dcd-2024-03-10 7/26] drivers/cxl/core/hdm.c:445:3: warning: label followed by a declaration is a C23 extension 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).