Re: [PATCH] ASoC: qcom: Use devm_platform_ioremap_resource_byname() to simplify code

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

 



Hi Tang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on asoc/for-next]
[also build test ERROR on v5.7-rc4 next-20200504]
[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/Tang-Bin/ASoC-qcom-Use-devm_platform_ioremap_resource_byname-to-simplify-code/20200505-051041
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=sh 

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

All errors (new ones prefixed by >>):

   sound/soc/qcom/lpass-cpu.c: In function 'asoc_qcom_lpass_cpu_platform_probe':
>> sound/soc/qcom/lpass-cpu.c:445:21: error: expected ';' before 'if'
     445 |       "lpass-lpaif")
         |                     ^
         |                     ;
     446 |  if (IS_ERR((void const __force *)drvdata->lpaif)) {
         |  ~~                  

vim +445 sound/soc/qcom/lpass-cpu.c

   415	
   416	int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
   417	{
   418		struct lpass_data *drvdata;
   419		struct device_node *dsp_of_node;
   420		struct lpass_variant *variant;
   421		struct device *dev = &pdev->dev;
   422		const struct of_device_id *match;
   423		int ret, i, dai_id;
   424	
   425		dsp_of_node = of_parse_phandle(pdev->dev.of_node, "qcom,adsp", 0);
   426		if (dsp_of_node) {
   427			dev_err(&pdev->dev, "DSP exists and holds audio resources\n");
   428			return -EBUSY;
   429		}
   430	
   431		drvdata = devm_kzalloc(&pdev->dev, sizeof(struct lpass_data),
   432				GFP_KERNEL);
   433		if (!drvdata)
   434			return -ENOMEM;
   435		platform_set_drvdata(pdev, drvdata);
   436	
   437		match = of_match_device(dev->driver->of_match_table, dev);
   438		if (!match || !match->data)
   439			return -EINVAL;
   440	
   441		drvdata->variant = (struct lpass_variant *)match->data;
   442		variant = drvdata->variant;
   443	
   444		drvdata->lpaif = devm_platform_ioremap_resource_byname(pdev,
 > 445							"lpass-lpaif")
   446		if (IS_ERR((void const __force *)drvdata->lpaif)) {
   447			dev_err(&pdev->dev, "error mapping reg resource: %ld\n",
   448					PTR_ERR((void const __force *)drvdata->lpaif));
   449			return PTR_ERR((void const __force *)drvdata->lpaif);
   450		}
   451	
   452		lpass_cpu_regmap_config.max_register = LPAIF_WRDMAPER_REG(variant,
   453							variant->wrdma_channels +
   454							variant->wrdma_channel_start);
   455	
   456		drvdata->lpaif_map = devm_regmap_init_mmio(&pdev->dev, drvdata->lpaif,
   457				&lpass_cpu_regmap_config);
   458		if (IS_ERR(drvdata->lpaif_map)) {
   459			dev_err(&pdev->dev, "error initializing regmap: %ld\n",
   460				PTR_ERR(drvdata->lpaif_map));
   461			return PTR_ERR(drvdata->lpaif_map);
   462		}
   463	
   464		if (variant->init)
   465			variant->init(pdev);
   466	
   467		for (i = 0; i < variant->num_dai; i++) {
   468			dai_id = variant->dai_driver[i].id;
   469			drvdata->mi2s_osr_clk[dai_id] = devm_clk_get(&pdev->dev,
   470						     variant->dai_osr_clk_names[i]);
   471			if (IS_ERR(drvdata->mi2s_osr_clk[dai_id])) {
   472				dev_warn(&pdev->dev,
   473					"%s() error getting optional %s: %ld\n",
   474					__func__,
   475					variant->dai_osr_clk_names[i],
   476					PTR_ERR(drvdata->mi2s_osr_clk[dai_id]));
   477	
   478				drvdata->mi2s_osr_clk[dai_id] = NULL;
   479			}
   480	
   481			drvdata->mi2s_bit_clk[dai_id] = devm_clk_get(&pdev->dev,
   482							variant->dai_bit_clk_names[i]);
   483			if (IS_ERR(drvdata->mi2s_bit_clk[dai_id])) {
   484				dev_err(&pdev->dev,
   485					"error getting %s: %ld\n",
   486					variant->dai_bit_clk_names[i],
   487					PTR_ERR(drvdata->mi2s_bit_clk[dai_id]));
   488				return PTR_ERR(drvdata->mi2s_bit_clk[dai_id]);
   489			}
   490		}
   491	
   492		drvdata->ahbix_clk = devm_clk_get(&pdev->dev, "ahbix-clk");
   493		if (IS_ERR(drvdata->ahbix_clk)) {
   494			dev_err(&pdev->dev, "error getting ahbix-clk: %ld\n",
   495				PTR_ERR(drvdata->ahbix_clk));
   496			return PTR_ERR(drvdata->ahbix_clk);
   497		}
   498	
   499		ret = clk_set_rate(drvdata->ahbix_clk, LPASS_AHBIX_CLOCK_FREQUENCY);
   500		if (ret) {
   501			dev_err(&pdev->dev, "error setting rate on ahbix_clk: %d\n",
   502				ret);
   503			return ret;
   504		}
   505		dev_dbg(&pdev->dev, "set ahbix_clk rate to %lu\n",
   506			clk_get_rate(drvdata->ahbix_clk));
   507	
   508		ret = clk_prepare_enable(drvdata->ahbix_clk);
   509		if (ret) {
   510			dev_err(&pdev->dev, "error enabling ahbix_clk: %d\n", ret);
   511			return ret;
   512		}
   513	
   514		ret = devm_snd_soc_register_component(&pdev->dev,
   515						      &lpass_cpu_comp_driver,
   516						      variant->dai_driver,
   517						      variant->num_dai);
   518		if (ret) {
   519			dev_err(&pdev->dev, "error registering cpu driver: %d\n", ret);
   520			goto err_clk;
   521		}
   522	
   523		ret = asoc_qcom_lpass_platform_register(pdev);
   524		if (ret) {
   525			dev_err(&pdev->dev, "error registering platform driver: %d\n",
   526				ret);
   527			goto err_clk;
   528		}
   529	
   530		return 0;
   531	
   532	err_clk:
   533		clk_disable_unprepare(drvdata->ahbix_clk);
   534		return ret;
   535	}
   536	EXPORT_SYMBOL_GPL(asoc_qcom_lpass_cpu_platform_probe);
   537	

---
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