All of lore.kernel.org
 help / color / mirror / Atom feed
* [broonie-ci:20250205_ckeepax_add_sdca_disco_parsing_support 33/37] sound/soc/sdca/sdca_functions.c:630:23: sparse: sparse: cast to restricted __le16
@ 2025-02-10 18:01 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-10 18:01 UTC (permalink / raw)
  To: Charles Keepax; +Cc: oe-kbuild-all, Mark Brown, Pierre-Louis Bossart

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/ci.git 20250205_ckeepax_add_sdca_disco_parsing_support
head:   9da195880f167ab7c2d595388decf783c9920121
commit: 64fb5af1d1bbcf1b808e9bb092b22fa1b691ae63 [33/37] ASoC: SDCA: Add parsing for Control range structures
config: i386-randconfig-061-20250210 (https://download.01.org/0day-ci/archive/20250211/202502110129.tHRpGeoS-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250211/202502110129.tHRpGeoS-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/202502110129.tHRpGeoS-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   sound/soc/sdca/sdca_functions.c:233:36: sparse: sparse: cast to restricted __le32
>> sound/soc/sdca/sdca_functions.c:630:23: sparse: sparse: cast to restricted __le16
   sound/soc/sdca/sdca_functions.c:631:23: sparse: sparse: cast to restricted __le16
   sound/soc/sdca/sdca_functions.c:639:34: sparse: sparse: cast to restricted __le32

vim +630 sound/soc/sdca/sdca_functions.c

   605	
   606	static int find_sdca_control_range(struct device *dev,
   607					   struct fwnode_handle *control_node,
   608					   struct sdca_control_range *range)
   609	{
   610		u8 *range_list;
   611		int num_range;
   612		u16 *limits;
   613		int i;
   614	
   615		num_range = fwnode_property_count_u8(control_node, "mipi-sdca-control-range");
   616		if (!num_range || num_range == -EINVAL)
   617			return 0;
   618		else if (num_range < 0)
   619			return num_range;
   620	
   621		range_list = devm_kcalloc(dev, num_range, sizeof(*range_list), GFP_KERNEL);
   622		if (!range_list)
   623			return -ENOMEM;
   624	
   625		fwnode_property_read_u8_array(control_node, "mipi-sdca-control-range",
   626					      range_list, num_range);
   627	
   628		limits = (u16 *)range_list;
   629	
 > 630		range->cols = le16_to_cpu(limits[0]);
   631		range->rows = le16_to_cpu(limits[1]);
   632		range->data = (u32 *)&limits[2];
   633	
   634		num_range = (num_range - (2 * sizeof(*limits))) / sizeof(*range->data);
   635		if (num_range != range->cols * range->rows)
   636			return -EINVAL;
   637	
   638		for (i = 0; i < num_range; i++)
   639			range->data[i] = le32_to_cpu(range->data[i]);
   640	
   641		return 0;
   642	}
   643	

-- 
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:[~2025-02-10 18:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 18:01 [broonie-ci:20250205_ckeepax_add_sdca_disco_parsing_support 33/37] sound/soc/sdca/sdca_functions.c:630:23: sparse: sparse: cast to restricted __le16 kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.