From: kernel test robot <lkp@intel.com>
To: Sameer Pujar <spujar@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Mark Brown <broonie@kernel.org>
Subject: sound/soc/generic/simple-card-utils.c:28:33: sparse: sparse: incorrect type in initializer (different base types)
Date: Tue, 31 Oct 2023 06:01:47 +0800 [thread overview]
Message-ID: <202310310501.Yb4dFWIo-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 14ab6d425e80674b6a0145f05719b11e82e64824
commit: 047a05366f4bb2e32eabbd3c8990d1d91ab87c89 ASoC: simple-card-utils: Fixup DAI sample format
date: 1 year, 3 months ago
config: x86_64-randconfig-x014-20230805 (https://download.01.org/0day-ci/archive/20231031/202310310501.Yb4dFWIo-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/20231031/202310310501.Yb4dFWIo-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/202310310501.Yb4dFWIo-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://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-10-30 22:02 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=202310310501.Yb4dFWIo-lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=spujar@nvidia.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®