linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 673/4736] sound/soc/generic/simple-card-utils.c:28:33: sparse: sparse: incorrect type in initializer (different base types)
@ 2022-09-05 14:33 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-09-05 14:33 UTC (permalink / raw)
  To: Sameer Pujar; +Cc: kbuild-all, Linux Memory Management List, Mark Brown

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   e47eb90a0a9ae20b82635b9b99a8d0979b757ad8
commit: 047a05366f4bb2e32eabbd3c8990d1d91ab87c89 [673/4736] ASoC: simple-card-utils: Fixup DAI sample format
config: mips-randconfig-s031-20220905 (https://download.01.org/0day-ci/archive/20220905/202209052235.BBo4f6mK-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=047a05366f4bb2e32eabbd3c8990d1d91ab87c89
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 047a05366f4bb2e32eabbd3c8990d1d91ab87c89
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash mm/ sound/soc/generic/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

sparse warnings: (new ones prefixed by >>)
>> sound/soc/generic/simple-card-utils.c:28:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] val @@     got restricted snd_pcm_format_t [usertype] @@
   sound/soc/generic/simple-card-utils.c:28:33: sparse:     expected unsigned int [usertype] val
   sound/soc/generic/simple-card-utils.c:28:33: sparse:     got restricted snd_pcm_format_t [usertype]
   sound/soc/generic/simple-card-utils.c:29:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] val @@     got restricted snd_pcm_format_t [usertype] @@
   sound/soc/generic/simple-card-utils.c:29:33: sparse:     expected unsigned int [usertype] val
   sound/soc/generic/simple-card-utils.c:29:33: sparse:     got restricted snd_pcm_format_t [usertype]
   sound/soc/generic/simple-card-utils.c:30:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] val @@     got restricted snd_pcm_format_t [usertype] @@
   sound/soc/generic/simple-card-utils.c:30:33: sparse:     expected unsigned int [usertype] val
   sound/soc/generic/simple-card-utils.c:30:33: sparse:     got restricted snd_pcm_format_t [usertype]
   sound/soc/generic/simple-card-utils.c:31:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] val @@     got restricted snd_pcm_format_t [usertype] @@
   sound/soc/generic/simple-card-utils.c:31:33: sparse:     expected unsigned int [usertype] val
   sound/soc/generic/simple-card-utils.c:31:33: sparse:     got restricted snd_pcm_format_t [usertype]
   sound/soc/generic/simple-card-utils.c:32:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] val @@     got restricted snd_pcm_format_t [usertype] @@
   sound/soc/generic/simple-card-utils.c:32:33: sparse:     expected unsigned int [usertype] val
   sound/soc/generic/simple-card-utils.c:32:33: sparse:     got restricted snd_pcm_format_t [usertype]

vim +28 sound/soc/generic/simple-card-utils.c

    17	
    18	static void asoc_simple_fixup_sample_fmt(struct asoc_simple_data *data,
    19						 struct snd_pcm_hw_params *params)
    20	{
    21		int i;
    22		struct snd_mask *mask = hw_param_mask(params,
    23						      SNDRV_PCM_HW_PARAM_FORMAT);
    24		struct {
    25			char *fmt;
    26			u32 val;
    27		} of_sample_fmt_table[] = {
  > 28			{ "s8",		SNDRV_PCM_FORMAT_S8},
    29			{ "s16_le",	SNDRV_PCM_FORMAT_S16_LE},
    30			{ "s24_le",	SNDRV_PCM_FORMAT_S24_LE},
    31			{ "s24_3le",	SNDRV_PCM_FORMAT_S24_3LE},
    32			{ "s32_le",	SNDRV_PCM_FORMAT_S32_LE},
    33		};
    34	
    35		for (i = 0; i < ARRAY_SIZE(of_sample_fmt_table); i++) {
    36			if (!strcmp(data->convert_sample_format,
    37				    of_sample_fmt_table[i].fmt)) {
    38				snd_mask_none(mask);
    39				snd_mask_set(mask, of_sample_fmt_table[i].val);
    40				break;
    41			}
    42		}
    43	}
    44	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [linux-next:master 673/4736] sound/soc/generic/simple-card-utils.c:28:33: sparse: sparse: incorrect type in initializer (different base types)
@ 2022-09-05 10:59 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-09-05 10:59 UTC (permalink / raw)
  To: Sameer Pujar; +Cc: kbuild-all, Linux Memory Management List, Mark Brown

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   e47eb90a0a9ae20b82635b9b99a8d0979b757ad8
commit: 047a05366f4bb2e32eabbd3c8990d1d91ab87c89 [673/4736] ASoC: simple-card-utils: Fixup DAI sample format
config: mips-randconfig-s031-20220905 (https://download.01.org/0day-ci/archive/20220905/202209051827.hPPbN7yX-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=047a05366f4bb2e32eabbd3c8990d1d91ab87c89
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 047a05366f4bb2e32eabbd3c8990d1d91ab87c89
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash mm/ sound/soc/generic/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

sparse warnings: (new ones prefixed by >>)
>> sound/soc/generic/simple-card-utils.c:28:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] val @@     got restricted snd_pcm_format_t [usertype] @@
   sound/soc/generic/simple-card-utils.c:28:33: sparse:     expected unsigned int [usertype] val
   sound/soc/generic/simple-card-utils.c:28:33: sparse:     got restricted snd_pcm_format_t [usertype]
   sound/soc/generic/simple-card-utils.c:29:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] val @@     got restricted snd_pcm_format_t [usertype] @@
   sound/soc/generic/simple-card-utils.c:29:33: sparse:     expected unsigned int [usertype] val
   sound/soc/generic/simple-card-utils.c:29:33: sparse:     got restricted snd_pcm_format_t [usertype]
   sound/soc/generic/simple-card-utils.c:30:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] val @@     got restricted snd_pcm_format_t [usertype] @@
   sound/soc/generic/simple-card-utils.c:30:33: sparse:     expected unsigned int [usertype] val
   sound/soc/generic/simple-card-utils.c:30:33: sparse:     got restricted snd_pcm_format_t [usertype]
   sound/soc/generic/simple-card-utils.c:31:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] val @@     got restricted snd_pcm_format_t [usertype] @@
   sound/soc/generic/simple-card-utils.c:31:33: sparse:     expected unsigned int [usertype] val
   sound/soc/generic/simple-card-utils.c:31:33: sparse:     got restricted snd_pcm_format_t [usertype]
   sound/soc/generic/simple-card-utils.c:32:33: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned int [usertype] val @@     got restricted snd_pcm_format_t [usertype] @@
   sound/soc/generic/simple-card-utils.c:32:33: sparse:     expected unsigned int [usertype] val
   sound/soc/generic/simple-card-utils.c:32:33: sparse:     got restricted snd_pcm_format_t [usertype]

vim +28 sound/soc/generic/simple-card-utils.c

    17	
    18	static void asoc_simple_fixup_sample_fmt(struct asoc_simple_data *data,
    19						 struct snd_pcm_hw_params *params)
    20	{
    21		int i;
    22		struct snd_mask *mask = hw_param_mask(params,
    23						      SNDRV_PCM_HW_PARAM_FORMAT);
    24		struct {
    25			char *fmt;
    26			u32 val;
    27		} of_sample_fmt_table[] = {
  > 28			{ "s8",		SNDRV_PCM_FORMAT_S8},
    29			{ "s16_le",	SNDRV_PCM_FORMAT_S16_LE},
    30			{ "s24_le",	SNDRV_PCM_FORMAT_S24_LE},
    31			{ "s24_3le",	SNDRV_PCM_FORMAT_S24_3LE},
    32			{ "s32_le",	SNDRV_PCM_FORMAT_S32_LE},
    33		};
    34	
    35		for (i = 0; i < ARRAY_SIZE(of_sample_fmt_table); i++) {
    36			if (!strcmp(data->convert_sample_format,
    37				    of_sample_fmt_table[i].fmt)) {
    38				snd_mask_none(mask);
    39				snd_mask_set(mask, of_sample_fmt_table[i].val);
    40				break;
    41			}
    42		}
    43	}
    44	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-05 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 14:33 [linux-next:master 673/4736] sound/soc/generic/simple-card-utils.c:28:33: sparse: sparse: incorrect type in initializer (different base types) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-09-05 10:59 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