All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: oe-kbuild-all@lists.linux.dev, Mark Brown <broonie@kernel.org>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Subject: [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
Date: Tue, 11 Feb 2025 02:01:57 +0800	[thread overview]
Message-ID: <202502110129.tHRpGeoS-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-02-10 18:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202502110129.tHRpGeoS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pierre-louis.bossart@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.