mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* sound/soc/codecs/rt5575-spi.c:85:26: sparse: sparse: incorrect type in assignment (different base types)
@ 2026-06-22 17:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-22 17:43 UTC (permalink / raw)
  To: Oder Chiou; +Cc: oe-kbuild-all, linux-kernel, Mark Brown

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ef0c9f75a19532d7675384708fc8621e10850104
commit: 420739112e95c9bb286b4e87875706925970abd3 ASoC: rt5575: Add the codec driver for the ALC5575
date:   6 months ago
config: sparc64-randconfig-r134-20260622 (https://download.01.org/0day-ci/archive/20260623/202606230139.rFZUVpCa-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260623/202606230139.rFZUVpCa-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
| Fixes: 420739112e95 ("ASoC: rt5575: Add the codec driver for the ALC5575")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606230139.rFZUVpCa-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> sound/soc/codecs/rt5575-spi.c:85:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] addr @@     got restricted __le32 [usertype] @@
   sound/soc/codecs/rt5575-spi.c:85:26: sparse:     expected unsigned int [usertype] addr
   sound/soc/codecs/rt5575-spi.c:85:26: sparse:     got restricted __le32 [usertype]

vim +85 sound/soc/codecs/rt5575-spi.c

    63	
    64	/**
    65	 * rt5575_spi_burst_write - Write data to SPI by rt5575 address.
    66	 * @spi: SPI device.
    67	 * @addr: Start address.
    68	 * @txbuf: Data buffer for writing.
    69	 * @len: Data length.
    70	 *
    71	 */
    72	static void rt5575_spi_burst_write(struct spi_device *spi, u32 addr, const u8 *txbuf, size_t len)
    73	{
    74		struct rt5575_spi_burst_write buf = {
    75			.cmd = RT5575_SPI_CMD_BURST_WRITE,
    76		};
    77		unsigned int end, offset = 0;
    78	
    79		while (offset < len) {
    80			if (offset + RT5575_SPI_BUF_LEN <= len)
    81				end = RT5575_SPI_BUF_LEN;
    82			else
    83				end = len % RT5575_SPI_BUF_LEN;
    84	
  > 85			buf.addr = cpu_to_le32(addr + offset);
    86			memcpy(&buf.data, &txbuf[offset], end);
    87			spi_write(spi, &buf, sizeof(buf));
    88	
    89			offset += RT5575_SPI_BUF_LEN;
    90		}
    91	}
    92	

--
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:[~2026-06-22 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-22 17:43 sound/soc/codecs/rt5575-spi.c:85:26: sparse: sparse: incorrect type in assignment (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