mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Alexander Usyskin <alexander.usyskin@intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: drivers/misc/mei/vsc-tp.c:327:28: sparse: sparse: incorrect type in argument 1 (different base types)
Date: Wed, 7 May 2025 16:37:56 +0800	[thread overview]
Message-ID: <202505071634.kZ0I7Va6-lkp@intel.com> (raw)

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

                 reply	other threads:[~2025-05-07  8:38 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=202505071634.kZ0I7Va6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexander.usyskin@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sakari.ailus@linux.intel.com \
    /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 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®