From: kbuild test robot <lkp@intel.com>
To: Dan Murphy <dmurphy@ti.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
kbuild-all@01.org
Subject: [alsa-devel] [asoc:for-5.5 122/122] sound/soc/codecs/tas2562.c:195:14: sparse: sparse: restricted snd_pcm_format_t degrades to integer
Date: Fri, 11 Oct 2019 00:41:19 +0800 [thread overview]
Message-ID: <201910110016.g5AIyc2E%lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.5
head: c173dba44c2d2ec2adaa4e607e9729b74236bd57
commit: c173dba44c2d2ec2adaa4e607e9729b74236bd57 [122/122] ASoC: tas2562: Introduce the TAS2562 amplifier
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-42-g38eda53-dirty
git checkout c173dba44c2d2ec2adaa4e607e9729b74236bd57
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> sound/soc/codecs/tas2562.c:195:14: sparse: sparse: restricted snd_pcm_format_t degrades to integer
sound/soc/codecs/tas2562.c:202:14: sparse: sparse: restricted snd_pcm_format_t degrades to integer
sound/soc/codecs/tas2562.c:209:14: sparse: sparse: restricted snd_pcm_format_t degrades to integer
>> sound/soc/codecs/tas2562.c:246:58: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected int bitwidth @@ got restricted snd_pcm_formint bitwidth @@
>> sound/soc/codecs/tas2562.c:246:58: sparse: expected int bitwidth
>> sound/soc/codecs/tas2562.c:246:58: sparse: got restricted snd_pcm_format_t
sound/soc/codecs/tas2562.c:472:39: sparse: sparse: restricted snd_pcm_format_t degrades to integer
vim +195 sound/soc/codecs/tas2562.c
189
190 static int tas2562_set_bitwidth(struct tas2562_data *tas2562, int bitwidth)
191 {
192 int ret;
193
194 switch (bitwidth) {
> 195 case SNDRV_PCM_FORMAT_S16_LE:
196 snd_soc_component_update_bits(tas2562->component,
197 TAS2562_TDM_CFG2,
198 TAS2562_TDM_CFG2_RXWLEN_MASK,
199 TAS2562_TDM_CFG2_RXWLEN_16B);
200 tas2562->v_sense_slot = tas2562->i_sense_slot + 2;
201 break;
202 case SNDRV_PCM_FORMAT_S24_LE:
203 snd_soc_component_update_bits(tas2562->component,
204 TAS2562_TDM_CFG2,
205 TAS2562_TDM_CFG2_RXWLEN_MASK,
206 TAS2562_TDM_CFG2_RXWLEN_24B);
207 tas2562->v_sense_slot = tas2562->i_sense_slot + 4;
208 break;
209 case SNDRV_PCM_FORMAT_S32_LE:
210 snd_soc_component_update_bits(tas2562->component,
211 TAS2562_TDM_CFG2,
212 TAS2562_TDM_CFG2_RXWLEN_MASK,
213 TAS2562_TDM_CFG2_RXWLEN_32B);
214 tas2562->v_sense_slot = tas2562->i_sense_slot + 4;
215 break;
216
217 default:
218 dev_info(tas2562->dev, "Not supported params format\n");
219 }
220
221 ret = snd_soc_component_update_bits(tas2562->component,
222 TAS2562_TDM_CFG5,
223 TAS2562_TDM_CFG5_VSNS_EN | TAS2562_TDM_CFG5_VSNS_SLOT_MASK,
224 TAS2562_TDM_CFG5_VSNS_EN | tas2562->v_sense_slot);
225 if (ret < 0)
226 return ret;
227
228 ret = snd_soc_component_update_bits(tas2562->component,
229 TAS2562_TDM_CFG6,
230 TAS2562_TDM_CFG6_ISNS_EN | TAS2562_TDM_CFG6_ISNS_SLOT_MASK,
231 TAS2562_TDM_CFG6_ISNS_EN | tas2562->i_sense_slot);
232 if (ret < 0)
233 return ret;
234
235 return 0;
236 }
237
238 static int tas2562_hw_params(struct snd_pcm_substream *substream,
239 struct snd_pcm_hw_params *params,
240 struct snd_soc_dai *dai)
241 {
242 struct snd_soc_component *component = dai->component;
243 struct tas2562_data *tas2562 = snd_soc_component_get_drvdata(component);
244 int ret;
245
> 246 ret = tas2562_set_bitwidth(tas2562, params_format(params));
247 if (ret) {
248 dev_err(tas2562->dev, "set bitwidth failed, %d\n", ret);
249 return ret;
250 }
251
252 ret = tas2562_set_samplerate(tas2562, params_rate(params));
253 if (ret)
254 dev_err(tas2562->dev, "set bitwidth failed, %d\n", ret);
255
256 return ret;
257 }
258
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next reply other threads:[~2019-10-10 16:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 16:41 kbuild test robot [this message]
2019-10-11 12:13 ` [alsa-devel] [asoc:for-5.5 122/122] sound/soc/codecs/tas2562.c:195:14: sparse: sparse: restricted snd_pcm_format_t degrades to integer Dan Murphy
2019-10-21 19:19 ` Mark Brown
2019-10-22 0:17 ` [alsa-devel] [kbuild-all] " Rong Chen
2019-10-22 5:08 ` [alsa-devel] " Takashi Iwai
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=201910110016.g5AIyc2E%lkp@intel.com \
--to=lkp@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dmurphy@ti.com \
--cc=kbuild-all@01.org \
/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