Messages in this thread | | | Date | Fri, 25 Mar 2022 13:50:57 +0800 | From | kernel test robot <> | Subject | [broonie-misc:at91sam9g20ek 10/12] sound/soc/codecs/wm8731-spi.c:28:48: error: invalid application of 'sizeof' to incomplete type 'struct wm8731_priv' |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git at91sam9g20ek head: 3924683a22e84ba06478ea4aaa775319ba02f42c commit: 5b7214a7b726cbf25aaebfc8a05ede8c53d04d26 [10/12] ASoC: wm8731: Factor out the I2C and SPI bus code into separate modules config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220325/202203251303.ROlxE3s7-lkp@intel.com/config) compiler: powerpc-linux-gcc (GCC) 11.2.0 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 # https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git/commit/?id=5b7214a7b726cbf25aaebfc8a05ede8c53d04d26 git remote add broonie-misc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git git fetch --no-tags broonie-misc at91sam9g20ek git checkout 5b7214a7b726cbf25aaebfc8a05ede8c53d04d26 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash sound/soc/codecs/
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
sound/soc/codecs/wm8731-spi.c: In function 'wm8731_spi_probe': >> sound/soc/codecs/wm8731-spi.c:28:48: error: invalid application of 'sizeof' to incomplete type 'struct wm8731_priv' 28 | wm8731 = devm_kzalloc(&spi->dev, sizeof(*wm8731), GFP_KERNEL); | ^ >> sound/soc/codecs/wm8731-spi.c:34:15: error: invalid use of undefined type 'struct wm8731_priv' 34 | wm8731->regmap = devm_regmap_init_spi(spi, &wm8731_regmap); | ^~ >> sound/soc/codecs/wm8731-spi.c:34:26: error: implicit declaration of function 'devm_regmap_init_spi' [-Werror=implicit-function-declaration] 34 | wm8731->regmap = devm_regmap_init_spi(spi, &wm8731_regmap); | ^~~~~~~~~~~~~~~~~~~~ >> sound/soc/codecs/wm8731-spi.c:34:53: error: 'wm8731_regmap' undeclared (first use in this function) 34 | wm8731->regmap = devm_regmap_init_spi(spi, &wm8731_regmap); | ^~~~~~~~~~~~~ sound/soc/codecs/wm8731-spi.c:34:53: note: each undeclared identifier is reported only once for each function it appears in sound/soc/codecs/wm8731-spi.c:35:26: error: invalid use of undefined type 'struct wm8731_priv' 35 | if (IS_ERR(wm8731->regmap)) { | ^~ sound/soc/codecs/wm8731-spi.c:36:37: error: invalid use of undefined type 'struct wm8731_priv' 36 | ret = PTR_ERR(wm8731->regmap); | ^~ >> sound/soc/codecs/wm8731-spi.c:42:16: error: implicit declaration of function 'wm8731_init' [-Werror=implicit-function-declaration] 42 | return wm8731_init(&spi->dev, wm8731); | ^~~~~~~~~~~ cc1: some warnings being treated as errors
vim +28 sound/soc/codecs/wm8731-spi.c
22 23 static int wm8731_spi_probe(struct spi_device *spi) 24 { 25 struct wm8731_priv *wm8731; 26 int ret; 27 > 28 wm8731 = devm_kzalloc(&spi->dev, sizeof(*wm8731), GFP_KERNEL); 29 if (wm8731 == NULL) 30 return -ENOMEM; 31 32 spi_set_drvdata(spi, wm8731); 33 > 34 wm8731->regmap = devm_regmap_init_spi(spi, &wm8731_regmap); 35 if (IS_ERR(wm8731->regmap)) { 36 ret = PTR_ERR(wm8731->regmap); 37 dev_err(&spi->dev, "Failed to allocate register map: %d\n", 38 ret); 39 return ret; 40 } 41 > 42 return wm8731_init(&spi->dev, wm8731); 43 } 44
-- 0-DAY CI Kernel Test Service https://01.org/lkp
| |