Re: [RESEND PATCH v5 2/6] ASoC: amd: Refactoring of DAI from DMA driver

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

 



Hi Ravulapati,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on asoc/for-next]
[also build test WARNING on next-20191113]
[cannot apply to v5.4-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Ravulapati-Vishnu-vardhan-rao/ASoC-amd-Create-multiple-I2S-platform-device-Endpoint/20191113-230604
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-randconfig-h001-20191113 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   sound/soc/amd/raven/acp3x-pcm-dma.c: In function 'acp3x_dma_open':
>> sound/soc/amd/raven/acp3x-pcm-dma.c:268:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
     ^~~~~~
   sound/soc/amd/raven/acp3x-pcm-dma.c: In function 'acp3x_dma_new':
   sound/soc/amd/raven/acp3x-pcm-dma.c:352:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     struct device *parent = component->dev->parent;
     ^~~~~~
   sound/soc/amd/raven/acp3x-pcm-dma.c: In function 'acp3x_dma_close':
   sound/soc/amd/raven/acp3x-pcm-dma.c:377:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
     ^~~~~~

vim +268 sound/soc/amd/raven/acp3x-pcm-dma.c

0b87d6bcd6482b Vijendar Mukunda              2018-11-12  259  
f52368f36443b4 Kuninori Morimoto             2019-10-02  260  static int acp3x_dma_open(struct snd_soc_component *component,
f52368f36443b4 Kuninori Morimoto             2019-10-02  261  			  struct snd_pcm_substream *substream)
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  262  {
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  263  	int ret = 0;
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  264  	struct snd_pcm_runtime *runtime = substream->runtime;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13  265  	struct snd_soc_pcm_runtime *prtd = substream->private_data;
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13  266  
74480eceed0f95 Ravulapati Vishnu vardhan rao 2019-11-13  267  	component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
0b87d6bcd6482b Vijendar Mukunda              2018-11-12 @268  	struct i2s_dev_data *adata = dev_get_drvdata(component->dev);
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  269  	struct i2s_stream_instance *i2s_data = kzalloc(sizeof(struct i2s_stream_instance),
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  270  						       GFP_KERNEL);
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  271  	if (!i2s_data)
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  272  		return -EINVAL;
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  273  
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  274  	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  275  		runtime->hw = acp3x_pcm_hardware_playback;
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  276  	else
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  277  		runtime->hw = acp3x_pcm_hardware_capture;
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  278  
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  279  	ret = snd_pcm_hw_constraint_integer(runtime,
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  280  					    SNDRV_PCM_HW_PARAM_PERIODS);
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  281  	if (ret < 0) {
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  282  		dev_err(component->dev, "set integer constraint failed\n");
46dce404265975 Colin Ian King                2018-11-14  283  		kfree(i2s_data);
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  284  		return ret;
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  285  	}
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  286  
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  287  	if (!adata->play_stream && !adata->capture_stream)
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  288  		rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  289  
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  290  	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  291  		adata->play_stream = substream;
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  292  	else
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  293  		adata->capture_stream = substream;
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  294  
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  295  	i2s_data->acp3x_base = adata->acp3x_base;
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  296  	runtime->private_data = i2s_data;
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  297  	return 0;
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  298  }
0b87d6bcd6482b Vijendar Mukunda              2018-11-12  299  

:::::: The code at line 268 was first introduced by commit
:::::: 0b87d6bcd6482b4502d8fd21561380981dad501f ASoC: amd: add acp3x pcm driver dma ops

:::::: TO: Vijendar Mukunda <Vijendar.Mukunda@xxxxxxx>
:::::: CC: Mark Brown <broonie@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[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