tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/dma-fix2 head: de846f4c8c865ca0fe3952ee80ad165f4c64ea34 commit: de846f4c8c865ca0fe3952ee80ad165f4c64ea34 [150/150] ALSA: pcm: Use SG-buffer only when direct DMA is available config: nios2-allyesconfig (attached as .config) compiler: nios2-linux-gcc (GCC) 9.3.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 git checkout de846f4c8c865ca0fe3952ee80ad165f4c64ea34 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot lkp@intel.com
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
sound/core/pcm_memory.c: In function 'do_alloc_pages':
sound/core/pcm_memory.c:44:45: error: lvalue required as left operand of assignment
44 | (type == SNDRV_DMA_TYPE_DEV_SG || type = SNDRV_DMA_TYPE_DEV_UC_SG) && | ^
sound/core/pcm_memory.c:45:6: error: implicit declaration of function 'dma_is_direct'; did you mean 'io_is_direct'? [-Werror=implicit-function-declaration]
45 | dma_is_direct(get_dma_ops(dev))) { | ^~~~~~~~~~~~~ | io_is_direct
sound/core/pcm_memory.c:45:20: error: implicit declaration of function 'get_dma_ops' [-Werror=implicit-function-declaration]
45 | dma_is_direct(get_dma_ops(dev))) { | ^~~~~~~~~~~ In file included from include/linux/printk.h:326, from include/linux/kernel.h:15, from include/asm-generic/bug.h:19, from ./arch/nios2/include/generated/asm/bug.h:1, from include/linux/bug.h:5, from include/linux/io.h:11, from sound/core/pcm_memory.c:7:
sound/core/pcm_memory.c:47:11: error: 'device' undeclared (first use in this function)
47 | dev_dbg(device, "Use continuous page allocatorn"); | ^~~~~~ include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call' 125 | func(&id, ##__VA_ARGS__); | ^~~~~~~~~~~ include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call' 157 | _dynamic_func_call(fmt,__dynamic_dev_dbg, | ^~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:114:2: note: in expansion of macro 'dynamic_dev_dbg' 114 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~~~~
sound/core/pcm_memory.c:47:3: note: in expansion of macro 'dev_dbg'
47 | dev_dbg(device, "Use continuous page allocatorn"); | ^~~~~~~ sound/core/pcm_memory.c:47:11: note: each undeclared identifier is reported only once for each function it appears in 47 | dev_dbg(device, "Use continuous page allocatorn"); | ^~~~~~ include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call' 125 | func(&id, ##__VA_ARGS__); | ^~~~~~~~~~~ include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call' 157 | _dynamic_func_call(fmt,__dynamic_dev_dbg, | ^~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:114:2: note: in expansion of macro 'dynamic_dev_dbg' 114 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~~~~
sound/core/pcm_memory.c:47:3: note: in expansion of macro 'dev_dbg'
47 | dev_dbg(device, "Use continuous page allocatorn"); | ^~~~~~~ cc1: some warnings being treated as errors
vim +44 sound/core/pcm_memory.c
33 34 static int do_alloc_pages(struct snd_card *card, int type, struct device *dev, 35 size_t size, struct snd_dma_buffer *dmab) 36 { 37 int err; 38 39 if (max_alloc_per_card && 40 card->total_pcm_alloc_bytes + size > max_alloc_per_card) 41 return -ENOMEM; 42 43 if (IS_ENABLED(CONFIG_SND_DMA_SGBUF) &&
44 (type == SNDRV_DMA_TYPE_DEV_SG || type = SNDRV_DMA_TYPE_DEV_UC_SG) && 45 dma_is_direct(get_dma_ops(dev))) {
46 /* mutate to continuous page allocation */
47 dev_dbg(device, "Use continuous page allocator\n");
48 if (type == SNDRV_DMA_TYPE_DEV_SG) 49 type = SNDRV_DMA_TYPE_DEV; 50 else 51 type = SNDRV_DMA_TYPE_DEV_UC; 52 } 53 54 err = snd_dma_alloc_pages(type, dev, size, dmab); 55 if (!err) { 56 mutex_lock(&card->memory_mutex); 57 card->total_pcm_alloc_bytes += dmab->bytes; 58 mutex_unlock(&card->memory_mutex); 59 } 60 return err; 61 } 62
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org