[alsa-devel] [asoc:topic/rt5670 3/3] sound/soc/codecs/rt5670.c:2448:57: error: 'codec' undeclared

kbuild test robot fengguang.wu at intel.com
Thu Jun 29 01:56:38 CEST 2017


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git topic/rt5670
head:   6c28ce3c425e32d372c7c6ee98d3c3711f13ad69
commit: 6c28ce3c425e32d372c7c6ee98d3c3711f13ad69 [3/3] ASoC: rt5670: move set_sysclk to codec level
config: x86_64-randconfig-x002-201726 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 6c28ce3c425e32d372c7c6ee98d3c3711f13ad69
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   sound/soc/codecs/rt5670.c: In function 'rt5670_set_codec_sysclk':
>> sound/soc/codecs/rt5670.c:2448:57: error: 'codec' undeclared (first use in this function)
     struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec);
                                                            ^~~~~
   sound/soc/codecs/rt5670.c:2448:57: note: each undeclared identifier is reported only once for each function it appears in
   sound/soc/codecs/rt5670.c: At top level:
>> sound/soc/codecs/rt5670.c:2775:16: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .set_sysclk = rt5670_set_codec_sysclk,
                   ^~~~~~~~~~~~~~~~~~~~~~~
   sound/soc/codecs/rt5670.c:2775:16: note: (near initialization for 'soc_codec_dev_rt5670.set_sysclk')
   cc1: some warnings being treated as errors

vim +/codec +2448 sound/soc/codecs/rt5670.c

5e8351de Bard Liao 2014-06-30  2442  	return 0;
5e8351de Bard Liao 2014-06-30  2443  }
5e8351de Bard Liao 2014-06-30  2444  
6c28ce3c Bard Liao 2017-06-28  2445  static int rt5670_set_codec_sysclk(struct snd_soc_dai *dai, int clk_id,
6c28ce3c Bard Liao 2017-06-28  2446  				   int source, unsigned int freq, int dir)
5e8351de Bard Liao 2014-06-30  2447  {
5e8351de Bard Liao 2014-06-30 @2448  	struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec);
5e8351de Bard Liao 2014-06-30  2449  	unsigned int reg_val = 0;
5e8351de Bard Liao 2014-06-30  2450  
5e8351de Bard Liao 2014-06-30  2451  	switch (clk_id) {

:::::: The code at line 2448 was first introduced by commit
:::::: 5e8351de740d9eff26cc146a6591a4e7517496b0 ASoC: add RT5670 CODEC driver

:::::: TO: Bard Liao <bardliao at realtek.com>
:::::: CC: Mark Brown <broonie at linaro.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 27822 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20170629/4aecf318/attachment-0001.bin>


More information about the Alsa-devel mailing list