[PATCH 5/8] ASoC: mediatek: mt8195: add platform driver

kernel test robot lkp at intel.com
Fri Jun 18 00:24:26 PDT 2021


Hi Trevor,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on asoc/for-next]
[also build test WARNING on spi/for-next sound/for-next v5.13-rc6 next-20210617]
[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/Trevor-Wu/ASoC-mediatek-Add-support-for-MT8195-SoC/20210617-135036
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: arc-randconfig-s032-20210618 (attached as .config)
compiler: arceb-elf-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
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/417fbb6c45b9d2593ec42fd1c425d40e46bbd38e
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Trevor-Wu/ASoC-mediatek-Add-support-for-MT8195-SoC/20210617-135036
        git checkout 417fbb6c45b9d2593ec42fd1c425d40e46bbd38e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>


sparse warnings: (new ones prefixed by >>)
>> sound/soc/mediatek/common/mtk-afe-fe-dai.c:142:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got unsigned char *dma_area @@
   sound/soc/mediatek/common/mtk-afe-fe-dai.c:142:37: sparse:     expected void volatile [noderef] __iomem *addr
   sound/soc/mediatek/common/mtk-afe-fe-dai.c:142:37: sparse:     got unsigned char *dma_area

vim +142 sound/soc/mediatek/common/mtk-afe-fe-dai.c

283b612429a279 Garlic Tseng      2016-06-17  118  
283b612429a279 Garlic Tseng      2016-06-17  119  int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream,
283b612429a279 Garlic Tseng      2016-06-17  120  			 struct snd_pcm_hw_params *params,
283b612429a279 Garlic Tseng      2016-06-17  121  			 struct snd_soc_dai *dai)
283b612429a279 Garlic Tseng      2016-06-17  122  {
0cd08b10ae3b52 Kuninori Morimoto 2020-07-20  123  	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
e4b31b816c472b Ryder Lee         2018-04-25  124  	struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
c8ac82127c8363 Kuninori Morimoto 2020-03-23  125  	int id = asoc_rtd_to_cpu(rtd, 0)->id;
df799b9502edf8 Eason Yen         2019-11-15  126  	struct mtk_base_afe_memif *memif = &afe->memif[id];
df799b9502edf8 Eason Yen         2019-11-15  127  	int ret;
df799b9502edf8 Eason Yen         2019-11-15  128  	unsigned int channels = params_channels(params);
df799b9502edf8 Eason Yen         2019-11-15  129  	unsigned int rate = params_rate(params);
df799b9502edf8 Eason Yen         2019-11-15  130  	snd_pcm_format_t format = params_format(params);
283b612429a279 Garlic Tseng      2016-06-17  131  
df799b9502edf8 Eason Yen         2019-11-15  132  	if (afe->request_dram_resource)
df799b9502edf8 Eason Yen         2019-11-15  133  		afe->request_dram_resource(afe->dev);
df799b9502edf8 Eason Yen         2019-11-15  134  
df799b9502edf8 Eason Yen         2019-11-15  135  	dev_dbg(afe->dev, "%s(), %s, ch %d, rate %d, fmt %d, dma_addr %pad, dma_area %p, dma_bytes 0x%zx\n",
df799b9502edf8 Eason Yen         2019-11-15  136  		__func__, memif->data->name,
df799b9502edf8 Eason Yen         2019-11-15  137  		channels, rate, format,
df799b9502edf8 Eason Yen         2019-11-15  138  		&substream->runtime->dma_addr,
df799b9502edf8 Eason Yen         2019-11-15  139  		substream->runtime->dma_area,
df799b9502edf8 Eason Yen         2019-11-15  140  		substream->runtime->dma_bytes);
df799b9502edf8 Eason Yen         2019-11-15  141  
df799b9502edf8 Eason Yen         2019-11-15 @142  	memset_io(substream->runtime->dma_area, 0,
df799b9502edf8 Eason Yen         2019-11-15  143  		  substream->runtime->dma_bytes);
df799b9502edf8 Eason Yen         2019-11-15  144  
df799b9502edf8 Eason Yen         2019-11-15  145  	/* set addr */
df799b9502edf8 Eason Yen         2019-11-15  146  	ret = mtk_memif_set_addr(afe, id,
df799b9502edf8 Eason Yen         2019-11-15  147  				 substream->runtime->dma_area,
df799b9502edf8 Eason Yen         2019-11-15  148  				 substream->runtime->dma_addr,
df799b9502edf8 Eason Yen         2019-11-15  149  				 substream->runtime->dma_bytes);
df799b9502edf8 Eason Yen         2019-11-15  150  	if (ret) {
df799b9502edf8 Eason Yen         2019-11-15  151  		dev_err(afe->dev, "%s(), error, id %d, set addr, ret %d\n",
df799b9502edf8 Eason Yen         2019-11-15  152  			__func__, id, ret);
df799b9502edf8 Eason Yen         2019-11-15  153  		return ret;
df799b9502edf8 Eason Yen         2019-11-15  154  	}
283b612429a279 Garlic Tseng      2016-06-17  155  
283b612429a279 Garlic Tseng      2016-06-17  156  	/* set channel */
df799b9502edf8 Eason Yen         2019-11-15  157  	ret = mtk_memif_set_channel(afe, id, channels);
df799b9502edf8 Eason Yen         2019-11-15  158  	if (ret) {
df799b9502edf8 Eason Yen         2019-11-15  159  		dev_err(afe->dev, "%s(), error, id %d, set channel %d, ret %d\n",
df799b9502edf8 Eason Yen         2019-11-15  160  			__func__, id, channels, ret);
df799b9502edf8 Eason Yen         2019-11-15  161  		return ret;
283b612429a279 Garlic Tseng      2016-06-17  162  	}
283b612429a279 Garlic Tseng      2016-06-17  163  
283b612429a279 Garlic Tseng      2016-06-17  164  	/* set rate */
df799b9502edf8 Eason Yen         2019-11-15  165  	ret = mtk_memif_set_rate_substream(substream, id, rate);
df799b9502edf8 Eason Yen         2019-11-15  166  	if (ret) {
df799b9502edf8 Eason Yen         2019-11-15  167  		dev_err(afe->dev, "%s(), error, id %d, set rate %d, ret %d\n",
df799b9502edf8 Eason Yen         2019-11-15  168  			__func__, id, rate, ret);
df799b9502edf8 Eason Yen         2019-11-15  169  		return ret;
df799b9502edf8 Eason Yen         2019-11-15  170  	}
283b612429a279 Garlic Tseng      2016-06-17  171  
df799b9502edf8 Eason Yen         2019-11-15  172  	/* set format */
df799b9502edf8 Eason Yen         2019-11-15  173  	ret = mtk_memif_set_format(afe, id, format);
df799b9502edf8 Eason Yen         2019-11-15  174  	if (ret) {
df799b9502edf8 Eason Yen         2019-11-15  175  		dev_err(afe->dev, "%s(), error, id %d, set format %d, ret %d\n",
df799b9502edf8 Eason Yen         2019-11-15  176  			__func__, id, format, ret);
df799b9502edf8 Eason Yen         2019-11-15  177  		return ret;
df799b9502edf8 Eason Yen         2019-11-15  178  	}
283b612429a279 Garlic Tseng      2016-06-17  179  
283b612429a279 Garlic Tseng      2016-06-17  180  	return 0;
283b612429a279 Garlic Tseng      2016-06-17  181  }
283b612429a279 Garlic Tseng      2016-06-17  182  EXPORT_SYMBOL_GPL(mtk_afe_fe_hw_params);
283b612429a279 Garlic Tseng      2016-06-17  183  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 38731 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20210618/08744a80/attachment-0001.gz>


More information about the Linux-mediatek mailing list