[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202104162235.wvRZFt2h-lkp@intel.com>
Date: Fri, 16 Apr 2021 23:05:37 +0800
From: kernel test robot <lkp@...el.com>
To: Shengjiu Wang <shengjiu.wang@....com>, lgirdwood@...il.com,
broonie@...nel.org, perex@...ex.cz, tiwai@...e.com,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Cc: kbuild-all@...ts.01.org
Subject: Re: [PATCH] ASoC: ak4458: check reset control status
Hi Shengjiu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on asoc/for-next]
[also build test ERROR on v5.12-rc7 next-20210415]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Shengjiu-Wang/ASoC-ak4458-check-reset-control-status/20210416-200151
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-randconfig-s021-20210416 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://github.com/0day-ci/linux/commit/48f467759d71681e2d3c35253a6eed08e686bd16
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Shengjiu-Wang/ASoC-ak4458-check-reset-control-status/20210416-200151
git checkout 48f467759d71681e2d3c35253a6eed08e686bd16
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
sound/soc/codecs/ak4458.c: In function 'ak4458_hw_params':
>> sound/soc/codecs/ak4458.c:422:2: error: 'ret' undeclared (first use in this function); did you mean 'net'?
422 | ret = ak4458_rstn_control(component, 0);
| ^~~
| net
sound/soc/codecs/ak4458.c:422:2: note: each undeclared identifier is reported only once for each function it appears in
vim +422 sound/soc/codecs/ak4458.c
328
329 static int ak4458_hw_params(struct snd_pcm_substream *substream,
330 struct snd_pcm_hw_params *params,
331 struct snd_soc_dai *dai)
332 {
333 struct snd_soc_component *component = dai->component;
334 struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component);
335 int pcm_width = max(params_physical_width(params), ak4458->slot_width);
336 u8 format, dsdsel0, dsdsel1;
337 int nfs1, dsd_bclk;
338
339 nfs1 = params_rate(params);
340 ak4458->fs = nfs1;
341
342 /* calculate bit clock */
343 switch (params_format(params)) {
344 case SNDRV_PCM_FORMAT_DSD_U8:
345 case SNDRV_PCM_FORMAT_DSD_U16_LE:
346 case SNDRV_PCM_FORMAT_DSD_U16_BE:
347 case SNDRV_PCM_FORMAT_DSD_U32_LE:
348 case SNDRV_PCM_FORMAT_DSD_U32_BE:
349 dsd_bclk = nfs1 * params_physical_width(params);
350 switch (dsd_bclk) {
351 case 2822400:
352 dsdsel0 = 0;
353 dsdsel1 = 0;
354 break;
355 case 5644800:
356 dsdsel0 = 1;
357 dsdsel1 = 0;
358 break;
359 case 11289600:
360 dsdsel0 = 0;
361 dsdsel1 = 1;
362 break;
363 case 22579200:
364 if (ak4458->drvdata->type == AK4497) {
365 dsdsel0 = 1;
366 dsdsel1 = 1;
367 } else {
368 dev_err(dai->dev, "DSD512 not supported.\n");
369 return -EINVAL;
370 }
371 break;
372 default:
373 dev_err(dai->dev, "Unsupported dsd bclk.\n");
374 return -EINVAL;
375 }
376
377 snd_soc_component_update_bits(component, AK4458_06_DSD1,
378 AK4458_DSDSEL_MASK, dsdsel0);
379 snd_soc_component_update_bits(component, AK4458_09_DSD2,
380 AK4458_DSDSEL_MASK, dsdsel1);
381 break;
382 }
383
384 /* Master Clock Frequency Auto Setting Mode Enable */
385 snd_soc_component_update_bits(component, AK4458_00_CONTROL1, 0x80, 0x80);
386
387 switch (pcm_width) {
388 case 16:
389 if (ak4458->fmt == SND_SOC_DAIFMT_I2S)
390 format = AK4458_DIF_24BIT_I2S;
391 else
392 format = AK4458_DIF_16BIT_LSB;
393 break;
394 case 32:
395 switch (ak4458->fmt) {
396 case SND_SOC_DAIFMT_I2S:
397 format = AK4458_DIF_32BIT_I2S;
398 break;
399 case SND_SOC_DAIFMT_LEFT_J:
400 format = AK4458_DIF_32BIT_MSB;
401 break;
402 case SND_SOC_DAIFMT_RIGHT_J:
403 format = AK4458_DIF_32BIT_LSB;
404 break;
405 case SND_SOC_DAIFMT_DSP_B:
406 format = AK4458_DIF_32BIT_MSB;
407 break;
408 case SND_SOC_DAIFMT_PDM:
409 format = AK4458_DIF_32BIT_MSB;
410 break;
411 default:
412 return -EINVAL;
413 }
414 break;
415 default:
416 return -EINVAL;
417 }
418
419 snd_soc_component_update_bits(component, AK4458_00_CONTROL1,
420 AK4458_DIF_MASK, format);
421
> 422 ret = ak4458_rstn_control(component, 0);
423 if (ret)
424 return ret;
425
426 ret = ak4458_rstn_control(component, 1);
427 if (ret)
428 return ret;
429
430 return 0;
431 }
432
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (46243 bytes)
Powered by blists - more mailing lists