Re: [PATCH] ASoC: ak4458: check reset control status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-20210416]
[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: riscv-randconfig-r006-20210416 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # 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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> sound/soc/codecs/ak4458.c:422:2: error: use of undeclared identifier 'ret'
           ret = ak4458_rstn_control(component, 0);
           ^
   sound/soc/codecs/ak4458.c:423:6: error: use of undeclared identifier 'ret'
           if (ret)
               ^
   sound/soc/codecs/ak4458.c:424:10: error: use of undeclared identifier 'ret'
                   return ret;
                          ^
   sound/soc/codecs/ak4458.c:426:2: error: use of undeclared identifier 'ret'
           ret = ak4458_rstn_control(component, 1);
           ^
   sound/soc/codecs/ak4458.c:427:6: error: use of undeclared identifier 'ret'
           if (ret)
               ^
   sound/soc/codecs/ak4458.c:428:10: error: use of undeclared identifier 'ret'
                   return ret;
                          ^
   6 errors generated.


vim +/ret +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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux