[linux-next:pending-fixes 191/279] sound/pci/hda/tas2781_hda_i2c.c:530:30: sparse: sparse: incorrect type in assignment (different base types)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git pending-fixes
head:   bd5989ca496c1db7c3b1f279cb5dcabdfc33aa28
commit: 3beddef84d90590270465a907de1cfe2539ac70d [191/279] ALSA: hda/tas2781: fix wrong calibrated data order
config: i386-randconfig-063-20240814 (https://download.01.org/0day-ci/archive/20240814/202408141630.DiDUB8Z4-lkp@xxxxxxxxx/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/20240814/202408141630.DiDUB8Z4-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408141630.DiDUB8Z4-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> sound/pci/hda/tas2781_hda_i2c.c:530:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be32 [usertype] data @@     got unsigned int @@
   sound/pci/hda/tas2781_hda_i2c.c:530:30: sparse:     expected restricted __be32 [usertype] data
   sound/pci/hda/tas2781_hda_i2c.c:530:30: sparse:     got unsigned int

vim +530 sound/pci/hda/tas2781_hda_i2c.c

   515	
   516	static void tas2781_apply_calib(struct tasdevice_priv *tas_priv)
   517	{
   518		static const unsigned char page_array[CALIB_MAX] = {
   519			0x17, 0x18, 0x18, 0x13, 0x18,
   520		};
   521		static const unsigned char rgno_array[CALIB_MAX] = {
   522			0x74, 0x0c, 0x14, 0x70, 0x7c,
   523		};
   524		int offset = 0;
   525		int i, j, rc;
   526		__be32 data;
   527	
   528		for (i = 0; i < tas_priv->ndev; i++) {
   529			for (j = 0; j < CALIB_MAX; j++) {
 > 530				data = get_unaligned_be32(
   531					&tas_priv->cali_data.data[offset]);
   532				rc = tasdevice_dev_bulk_write(tas_priv, i,
   533					TASDEVICE_REG(0, page_array[j], rgno_array[j]),
   534					(unsigned char *)&data, 4);
   535				if (rc < 0)
   536					dev_err(tas_priv->dev,
   537						"chn %d calib %d bulk_wr err = %d\n",
   538						i, j, rc);
   539				offset += 4;
   540			}
   541		}
   542	}
   543	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux