sound/isa/es1688/es1688_lib.c:384:79: error: 'DMA_AUTOINIT' undeclared

From: kernel test robot
Date: Fri Sep 03 2021 - 18:57:45 EST


Hi Arnd,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7cca308cfdc0725363ac5943dca9dcd49cc1d2d5
commit: db87db65c1059f3be04506d122f8ec9b2fa3b05e m68knommu: only set CONFIG_ISA_DMA_API for ColdFire sub-arch
date: 12 days ago
config: m68k-buildonly-randconfig-r001-20210904 (attached as .config)
compiler: m68k-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/torvalds/linux.git/commit/?id=db87db65c1059f3be04506d122f8ec9b2fa3b05e
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout db87db65c1059f3be04506d122f8ec9b2fa3b05e
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash sound/isa/es1688/ sound/isa/sb/ sound/isa/wss/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

sound/isa/es1688/es1688_lib.c: In function 'snd_es1688_playback_prepare':
>> sound/isa/es1688/es1688_lib.c:384:79: error: 'DMA_AUTOINIT' undeclared (first use in this function)
384 | snd_dma_program(chip->dma8, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT);
| ^~~~~~~~~~~~
sound/isa/es1688/es1688_lib.c:384:79: note: each undeclared identifier is reported only once for each function it appears in
sound/isa/es1688/es1688_lib.c: In function 'snd_es1688_capture_prepare':
sound/isa/es1688/es1688_lib.c:441:78: error: 'DMA_AUTOINIT' undeclared (first use in this function)
441 | snd_dma_program(chip->dma8, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT);
| ^~~~~~~~~~~~
--
sound/isa/sb/sb16_main.c: In function 'snd_sb16_playback_prepare':
>> sound/isa/sb/sb16_main.c:253:72: error: 'DMA_AUTOINIT' undeclared (first use in this function)
253 | snd_dma_program(dma, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT);
| ^~~~~~~~~~~~
sound/isa/sb/sb16_main.c:253:72: note: each undeclared identifier is reported only once for each function it appears in
sound/isa/sb/sb16_main.c: In function 'snd_sb16_capture_prepare':
sound/isa/sb/sb16_main.c:322:71: error: 'DMA_AUTOINIT' undeclared (first use in this function)
322 | snd_dma_program(dma, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT);
| ^~~~~~~~~~~~
--
sound/isa/sb/sb8_main.c: In function 'snd_sb8_playback_prepare':
>> sound/isa/sb/sb8_main.c:188:48: error: 'DMA_AUTOINIT' undeclared (first use in this function)
188 | size, DMA_MODE_WRITE | DMA_AUTOINIT);
| ^~~~~~~~~~~~
sound/isa/sb/sb8_main.c:188:48: note: each undeclared identifier is reported only once for each function it appears in
sound/isa/sb/sb8_main.c: In function 'snd_sb8_capture_prepare':
sound/isa/sb/sb8_main.c:313:47: error: 'DMA_AUTOINIT' undeclared (first use in this function)
313 | size, DMA_MODE_READ | DMA_AUTOINIT);
| ^~~~~~~~~~~~
--
sound/isa/wss/wss_lib.c: In function 'snd_wss_playback_prepare':
>> sound/isa/wss/wss_lib.c:1004:79: error: 'DMA_AUTOINIT' undeclared (first use in this function)
1004 | snd_dma_program(chip->dma1, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT);
| ^~~~~~~~~~~~
sound/isa/wss/wss_lib.c:1004:79: note: each undeclared identifier is reported only once for each function it appears in
sound/isa/wss/wss_lib.c: In function 'snd_wss_capture_prepare':
sound/isa/wss/wss_lib.c:1039:78: error: 'DMA_AUTOINIT' undeclared (first use in this function)
1039 | snd_dma_program(chip->dma2, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT);
| ^~~~~~~~~~~~


vim +/DMA_AUTOINIT +384 sound/isa/es1688/es1688_lib.c

^1da177e4c3f41 Linus Torvalds 2005-04-16 337
d3a7e476740dc2 Takashi Iwai 2005-11-17 338 static int snd_es1688_playback_prepare(struct snd_pcm_substream *substream)
^1da177e4c3f41 Linus Torvalds 2005-04-16 339 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 340 unsigned long flags;
d3a7e476740dc2 Takashi Iwai 2005-11-17 341 struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
d3a7e476740dc2 Takashi Iwai 2005-11-17 342 struct snd_pcm_runtime *runtime = substream->runtime;
^1da177e4c3f41 Linus Torvalds 2005-04-16 343 unsigned int size = snd_pcm_lib_buffer_bytes(substream);
^1da177e4c3f41 Linus Torvalds 2005-04-16 344 unsigned int count = snd_pcm_lib_period_bytes(substream);
^1da177e4c3f41 Linus Torvalds 2005-04-16 345
^1da177e4c3f41 Linus Torvalds 2005-04-16 346 chip->dma_size = size;
^1da177e4c3f41 Linus Torvalds 2005-04-16 347 spin_lock_irqsave(&chip->reg_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 348 snd_es1688_reset(chip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 349 snd_es1688_set_rate(chip, substream);
^1da177e4c3f41 Linus Torvalds 2005-04-16 350 snd_es1688_write(chip, 0xb8, 4); /* auto init DMA mode */
^1da177e4c3f41 Linus Torvalds 2005-04-16 351 snd_es1688_write(chip, 0xa8, (snd_es1688_read(chip, 0xa8) & ~0x03) | (3 - runtime->channels));
^1da177e4c3f41 Linus Torvalds 2005-04-16 352 snd_es1688_write(chip, 0xb9, 2); /* demand mode (4 bytes/request) */
^1da177e4c3f41 Linus Torvalds 2005-04-16 353 if (runtime->channels == 1) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 354 if (snd_pcm_format_width(runtime->format) == 8) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 355 /* 8. bit mono */
^1da177e4c3f41 Linus Torvalds 2005-04-16 356 snd_es1688_write(chip, 0xb6, 0x80);
^1da177e4c3f41 Linus Torvalds 2005-04-16 357 snd_es1688_write(chip, 0xb7, 0x51);
^1da177e4c3f41 Linus Torvalds 2005-04-16 358 snd_es1688_write(chip, 0xb7, 0xd0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 359 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 360 /* 16. bit mono */
^1da177e4c3f41 Linus Torvalds 2005-04-16 361 snd_es1688_write(chip, 0xb6, 0x00);
^1da177e4c3f41 Linus Torvalds 2005-04-16 362 snd_es1688_write(chip, 0xb7, 0x71);
^1da177e4c3f41 Linus Torvalds 2005-04-16 363 snd_es1688_write(chip, 0xb7, 0xf4);
^1da177e4c3f41 Linus Torvalds 2005-04-16 364 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 365 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 366 if (snd_pcm_format_width(runtime->format) == 8) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 367 /* 8. bit stereo */
^1da177e4c3f41 Linus Torvalds 2005-04-16 368 snd_es1688_write(chip, 0xb6, 0x80);
^1da177e4c3f41 Linus Torvalds 2005-04-16 369 snd_es1688_write(chip, 0xb7, 0x51);
^1da177e4c3f41 Linus Torvalds 2005-04-16 370 snd_es1688_write(chip, 0xb7, 0x98);
^1da177e4c3f41 Linus Torvalds 2005-04-16 371 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 372 /* 16. bit stereo */
^1da177e4c3f41 Linus Torvalds 2005-04-16 373 snd_es1688_write(chip, 0xb6, 0x00);
^1da177e4c3f41 Linus Torvalds 2005-04-16 374 snd_es1688_write(chip, 0xb7, 0x71);
^1da177e4c3f41 Linus Torvalds 2005-04-16 375 snd_es1688_write(chip, 0xb7, 0xbc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 376 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 377 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 378 snd_es1688_write(chip, 0xb1, (snd_es1688_read(chip, 0xb1) & 0x0f) | 0x50);
^1da177e4c3f41 Linus Torvalds 2005-04-16 379 snd_es1688_write(chip, 0xb2, (snd_es1688_read(chip, 0xb2) & 0x0f) | 0x50);
^1da177e4c3f41 Linus Torvalds 2005-04-16 380 snd_es1688_dsp_command(chip, ES1688_DSP_CMD_SPKON);
^1da177e4c3f41 Linus Torvalds 2005-04-16 381 spin_unlock_irqrestore(&chip->reg_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 382 /* --- */
^1da177e4c3f41 Linus Torvalds 2005-04-16 383 count = -count;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @384 snd_dma_program(chip->dma8, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT);
^1da177e4c3f41 Linus Torvalds 2005-04-16 385 spin_lock_irqsave(&chip->reg_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 386 snd_es1688_write(chip, 0xa4, (unsigned char) count);
^1da177e4c3f41 Linus Torvalds 2005-04-16 387 snd_es1688_write(chip, 0xa5, (unsigned char) (count >> 8));
^1da177e4c3f41 Linus Torvalds 2005-04-16 388 spin_unlock_irqrestore(&chip->reg_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 389 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 390 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 391

:::::: The code at line 384 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip