Skip to contentSkip to conversation

include/sound/memalloc.h:110:undefined reference to `snd_devm_alloc_dir_pages'

PATCH kernel test robot 1 participant 1 message Nov 5

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git test/sound-rust-v7.3
head:   070444a8abf14da700680a5331d0a95cd11e578b
commit: fe14e02c46f52dd6e08b7e070f82849d8ae1a500 [20/56] ALSA: rust: pcm: Add DmaBuffer wrapper for snd_devm_alloc_pages
config: um-randconfig-2200-20261105 (https://download.01.org/0day-ci/archive/20261106/[email protected]/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261106/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

/usr/lib/gcc/i686-linux-gnu/14/../../../../i686-linux-gnu/bin/ld: warning: .tmp_vmlinux1 has a LOAD segment with RWX permissions /usr/lib/gcc/i686-linux-gnu/14/../../../../i686-linux-gnu/bin/ld: rust/helpers/helpers.o: in function `snd_devm_alloc_pages':

>> include/sound/memalloc.h:110:(.text+0x9212): undefined reference to `snd_devm_alloc_dir_pages'

clang: error: linker command failed with exit code 1 (use -v to see invocation)

vim +110 include/sound/memalloc.h

a25684a956468e Takashi Iwai 2021-10-17   96  
37af81c5998f4b Takashi Iwai 2021-06-09   97  dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab, size_t offset);
37af81c5998f4b Takashi Iwai 2021-06-09   98  struct page *snd_sgbuf_get_page(struct snd_dma_buffer *dmab, size_t offset);
37af81c5998f4b Takashi Iwai 2021-06-09   99  unsigned int snd_sgbuf_get_chunk_size(struct snd_dma_buffer *dmab,
37af81c5998f4b Takashi Iwai 2021-06-09  100  				      unsigned int ofs, unsigned int size);
37af81c5998f4b Takashi Iwai 2021-06-09  101  
427ae2689db0fb Takashi Iwai 2021-07-15  102  /* device-managed memory allocator */
a25684a956468e Takashi Iwai 2021-10-17  103  struct snd_dma_buffer *snd_devm_alloc_dir_pages(struct device *dev, int type,
a25684a956468e Takashi Iwai 2021-10-17  104  						enum dma_data_direction dir,
427ae2689db0fb Takashi Iwai 2021-07-15  105  						size_t size);
427ae2689db0fb Takashi Iwai 2021-07-15  106  
a25684a956468e Takashi Iwai 2021-10-17  107  static inline struct snd_dma_buffer *
a25684a956468e Takashi Iwai 2021-10-17  108  snd_devm_alloc_pages(struct device *dev, int type, size_t size)
a25684a956468e Takashi Iwai 2021-10-17  109  {

a25684a956468e Takashi Iwai 2021-10-17 @110 return snd_devm_alloc_dir_pages(dev, type, DMA_BIDIRECTIONAL, size);
a25684a956468e Takashi Iwai 2021-10-17 111 }
a25684a956468e Takashi Iwai 2021-10-17 112

:::::: The code at line 110 was first introduced by commit
:::::: a25684a956468ee8bbbee44649e41e5d447e5adc ALSA: memalloc: Support for non-contiguous page allocation

:::::: TO: Takashi Iwai <[email protected]>
:::::: CC: Takashi Iwai <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki