mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/misc/mei/vsc-tp.c:327:28: sparse: sparse: incorrect type in argument 1 (different base types)
@ 2025-05-07  8:37 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-07  8:37 UTC (permalink / raw)
  To: Hans de Goede
  Cc: oe-kbuild-all, linux-kernel, Alexander Usyskin, Sakari Ailus

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0d8d44db295ccad20052d6301ef49ff01fb8ae2d
commit: f88c0c72ffb014e5eba676ee337c4eb3b1d6a119 mei: vsc: Use struct vsc_tp_packet as vsc-tp tx_buf and rx_buf type
date:   3 weeks ago
config: x86_64-randconfig-121-20250428 (https://download.01.org/0day-ci/archive/20250507/202505071634.kZ0I7Va6-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/202505071634.kZ0I7Va6-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/202505071634.kZ0I7Va6-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/misc/mei/vsc-tp.c:327:28: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted __be32 [usertype] *dst @@     got unsigned int [usertype] * @@
   drivers/misc/mei/vsc-tp.c:327:28: sparse:     expected restricted __be32 [usertype] *dst
   drivers/misc/mei/vsc-tp.c:327:28: sparse:     got unsigned int [usertype] *
>> drivers/misc/mei/vsc-tp.c:343:42: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected restricted __be32 const [usertype] *src @@     got unsigned int [usertype] * @@
   drivers/misc/mei/vsc-tp.c:343:42: sparse:     expected restricted __be32 const [usertype] *src
   drivers/misc/mei/vsc-tp.c:343:42: sparse:     got unsigned int [usertype] *

vim +327 drivers/misc/mei/vsc-tp.c

   307	
   308	/**
   309	 * vsc_tp_rom_xfer - transfer data to rom code
   310	 * @tp: vsc_tp device handle
   311	 * @obuf: the data buffer to be sent to the device
   312	 * @ibuf: the buffer to receive data from the device
   313	 * @len: the length of tx buffer and rx buffer
   314	 * Return: 0 in case of success, negative value in case of error
   315	 */
   316	int vsc_tp_rom_xfer(struct vsc_tp *tp, const void *obuf, void *ibuf, size_t len)
   317	{
   318		size_t words = len / sizeof(__be32);
   319		int ret;
   320	
   321		if (len % sizeof(__be32) || len > VSC_TP_MAX_MSG_SIZE)
   322			return -EINVAL;
   323	
   324		guard(mutex)(&tp->mutex);
   325	
   326		/* rom xfer is big endian */
 > 327		cpu_to_be32_array((u32 *)tp->tx_buf, obuf, words);
   328	
   329		ret = read_poll_timeout(gpiod_get_value_cansleep, ret,
   330					!ret, VSC_TP_ROM_XFER_POLL_DELAY_US,
   331					VSC_TP_ROM_XFER_POLL_TIMEOUT_US, false,
   332					tp->wakeuphost);
   333		if (ret) {
   334			dev_err(&tp->spi->dev, "wait rom failed ret: %d\n", ret);
   335			return ret;
   336		}
   337	
   338		ret = vsc_tp_dev_xfer(tp, tp->tx_buf, ibuf ? tp->rx_buf : NULL, len);
   339		if (ret)
   340			return ret;
   341	
   342		if (ibuf)
 > 343			be32_to_cpu_array(ibuf, (u32 *)tp->rx_buf, words);
   344	
   345		return ret;
   346	}
   347	

-- 
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-05-07  8:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-07  8:37 drivers/misc/mei/vsc-tp.c:327:28: sparse: sparse: incorrect type in argument 1 (different base types) 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

all inboxes | Powered by JetHome®