[linux-next:master 2759/3001] sound/core/sound_kunit.c:106:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer

[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 master
head:   06f658aadff0e483ee4f807b0b46c9e5cba62bfa
commit: 3e39acf56ededdebd1033349a16b704839b94b28 [2759/3001] ALSA: core: Add sound core KUnit test
config: i386-randconfig-062-20240131 (https://download.01.org/0day-ci/archive/20240131/202401311655.FJYxii3p-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240131/202401311655.FJYxii3p-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/202401311655.FJYxii3p-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> sound/core/sound_kunit.c:106:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
>> sound/core/sound_kunit.c:106:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:106:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:106:9: sparse:     got int
>> sound/core/sound_kunit.c:106:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
>> sound/core/sound_kunit.c:106:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:106:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:106:9: sparse:     got int
   sound/core/sound_kunit.c:107:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:107:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:107:9: sparse:     got int
   sound/core/sound_kunit.c:107:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:107:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:107:9: sparse:     got int
   sound/core/sound_kunit.c:119:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:119:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:119:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:119:9: sparse:     got int
   sound/core/sound_kunit.c:119:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:119:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:119:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:119:9: sparse:     got int
   sound/core/sound_kunit.c:120:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:120:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:120:9: sparse:     got int
   sound/core/sound_kunit.c:120:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:120:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:120:9: sparse:     got int
   sound/core/sound_kunit.c:134:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:134:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:134:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:134:9: sparse:     got int
   sound/core/sound_kunit.c:134:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:134:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:134:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:134:9: sparse:     got int
   sound/core/sound_kunit.c:135:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:135:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:135:9: sparse:     got int
   sound/core/sound_kunit.c:135:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:135:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:135:9: sparse:     got int
   sound/core/sound_kunit.c:149:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:149:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:149:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:149:9: sparse:     got int
   sound/core/sound_kunit.c:149:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:149:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:149:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:149:9: sparse:     got int
   sound/core/sound_kunit.c:150:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:150:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:150:9: sparse:     got int
   sound/core/sound_kunit.c:150:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:150:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:150:9: sparse:     got int
   sound/core/sound_kunit.c:151:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:151:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:151:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:151:9: sparse:     got int
   sound/core/sound_kunit.c:151:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:151:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:151:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:151:9: sparse:     got int
   sound/core/sound_kunit.c:152:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:152:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:152:9: sparse:     got int
   sound/core/sound_kunit.c:152:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:152:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:152:9: sparse:     got int
   sound/core/sound_kunit.c:179:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:179:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:179:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:179:9: sparse:     got int
   sound/core/sound_kunit.c:179:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:179:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:179:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:179:9: sparse:     got int
   sound/core/sound_kunit.c:274:9: sparse: sparse: restricted snd_pcm_format_t degrades to integer
   sound/core/sound_kunit.c:274:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:274:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:274:9: sparse:     got int
   sound/core/sound_kunit.c:275:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got int @@
   sound/core/sound_kunit.c:275:9: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/core/sound_kunit.c:275:9: sparse:     got int

vim +106 sound/core/sound_kunit.c

    96	
    97	static void test_phys_format_size(struct kunit *test)
    98	{
    99		u32 i;
   100	
   101		for (i = 0; i < ARRAY_SIZE(valid_fmt); i++) {
   102			KUNIT_EXPECT_EQ(test, snd_pcm_format_physical_width(valid_fmt[i].format),
   103					valid_fmt[i].physical_bits);
   104		}
   105	
 > 106		KUNIT_EXPECT_EQ(test, snd_pcm_format_physical_width(WRONG_FORMAT), -EINVAL);
   107		KUNIT_EXPECT_EQ(test, snd_pcm_format_physical_width(-1), -EINVAL);
   108	}
   109	

-- 
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