[tiwai-sound:test/auto-cleanup 208/210] sound/sparc/amd7930.c:357:45: error: 'flags' undeclared

tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git test/auto-cleanup head: f29244cff0185975fee4f55293cca61cfd83af3e commit: db8ed7441c876cac679db2869b87b26633c89bde [208/210] ALSA: sparc/amd7930: Use guard() for spin locks config: sparc64-randconfig-002-20250910 (https://download.01.org/0day-ci/archive/20250911/202509110130.PlGyYo4k-lkp@i...) compiler: sparc64-linux-gcc (GCC) 12.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250911/202509110130.PlGyYo4k-lkp@i...)
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 lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202509110130.PlGyYo4k-lkp@intel.com/
All errors (new ones prefixed by >>):
sound/sparc/amd7930.c: In function 'amd7930_enable_ints':
sound/sparc/amd7930.c:357:45: error: 'flags' undeclared (first use in this function)
357 | guard(spinlock_irqsave)(&amd->lock, flags); | ^~~~~ sound/sparc/amd7930.c:357:45: note: each undeclared identifier is reported only once for each function it appears in In file included from include/linux/module.h:17, from sound/sparc/amd7930.c:33:
include/linux/cleanup.h:291:17: error: too many arguments to function 'class_spinlock_irqsave_constructor'
291 | class_##_name##_constructor | ^~~~~~ include/linux/cleanup.h:401:9: note: in expansion of macro 'CLASS' 401 | CLASS(_name, __UNIQUE_ID(guard)) | ^~~~~ sound/sparc/amd7930.c:357:9: note: in expansion of macro 'guard' 357 | guard(spinlock_irqsave)(&amd->lock, flags); | ^~~~~ include/linux/cleanup.h:477:33: note: declared here 477 | static inline class_##_name##_t class_##_name##_constructor(_type *l) \ | ^~~~~~ include/linux/cleanup.h:496:1: note: in expansion of macro '__DEFINE_LOCK_GUARD_1' 496 | __DEFINE_LOCK_GUARD_1(_name, _type, _lock) | ^~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock.h:585:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_1' 585 | DEFINE_LOCK_GUARD_1(spinlock_irqsave, spinlock_t, | ^~~~~~~~~~~~~~~~~~~ sound/sparc/amd7930.c: In function 'amd7930_disable_ints': sound/sparc/amd7930.c:365:45: error: 'flags' undeclared (first use in this function) 365 | guard(spinlock_irqsave)(&amd->lock, flags); | ^~~~~
include/linux/cleanup.h:291:17: error: too many arguments to function 'class_spinlock_irqsave_constructor'
291 | class_##_name##_constructor | ^~~~~~ include/linux/cleanup.h:401:9: note: in expansion of macro 'CLASS' 401 | CLASS(_name, __UNIQUE_ID(guard)) | ^~~~~ sound/sparc/amd7930.c:365:9: note: in expansion of macro 'guard' 365 | guard(spinlock_irqsave)(&amd->lock, flags); | ^~~~~ include/linux/cleanup.h:477:33: note: declared here 477 | static inline class_##_name##_t class_##_name##_constructor(_type *l) \ | ^~~~~~ include/linux/cleanup.h:496:1: note: in expansion of macro '__DEFINE_LOCK_GUARD_1' 496 | __DEFINE_LOCK_GUARD_1(_name, _type, _lock) | ^~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock.h:585:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_1' 585 | DEFINE_LOCK_GUARD_1(spinlock_irqsave, spinlock_t, | ^~~~~~~~~~~~~~~~~~~ -- amd7930.c: In function 'amd7930_enable_ints': amd7930.c:357:45: error: 'flags' undeclared (first use in this function) 357 | guard(spinlock_irqsave)(&amd->lock, flags); | ^~~~~ amd7930.c:357:45: note: each undeclared identifier is reported only once for each function it appears in In file included from include/linux/module.h:17, from amd7930.c:33:
include/linux/cleanup.h:291:17: error: too many arguments to function 'class_spinlock_irqsave_constructor'
291 | class_##_name##_constructor | ^~~~~~ include/linux/cleanup.h:401:9: note: in expansion of macro 'CLASS' 401 | CLASS(_name, __UNIQUE_ID(guard)) | ^~~~~ amd7930.c:357:9: note: in expansion of macro 'guard' 357 | guard(spinlock_irqsave)(&amd->lock, flags); | ^~~~~ include/linux/cleanup.h:477:33: note: declared here 477 | static inline class_##_name##_t class_##_name##_constructor(_type *l) \ | ^~~~~~ include/linux/cleanup.h:496:1: note: in expansion of macro '__DEFINE_LOCK_GUARD_1' 496 | __DEFINE_LOCK_GUARD_1(_name, _type, _lock) | ^~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock.h:585:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_1' 585 | DEFINE_LOCK_GUARD_1(spinlock_irqsave, spinlock_t, | ^~~~~~~~~~~~~~~~~~~ amd7930.c: In function 'amd7930_disable_ints': amd7930.c:365:45: error: 'flags' undeclared (first use in this function) 365 | guard(spinlock_irqsave)(&amd->lock, flags); | ^~~~~
include/linux/cleanup.h:291:17: error: too many arguments to function 'class_spinlock_irqsave_constructor'
291 | class_##_name##_constructor | ^~~~~~ include/linux/cleanup.h:401:9: note: in expansion of macro 'CLASS' 401 | CLASS(_name, __UNIQUE_ID(guard)) | ^~~~~ amd7930.c:365:9: note: in expansion of macro 'guard' 365 | guard(spinlock_irqsave)(&amd->lock, flags); | ^~~~~ include/linux/cleanup.h:477:33: note: declared here 477 | static inline class_##_name##_t class_##_name##_constructor(_type *l) \ | ^~~~~~ include/linux/cleanup.h:496:1: note: in expansion of macro '__DEFINE_LOCK_GUARD_1' 496 | __DEFINE_LOCK_GUARD_1(_name, _type, _lock) | ^~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock.h:585:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_1' 585 | DEFINE_LOCK_GUARD_1(spinlock_irqsave, spinlock_t, | ^~~~~~~~~~~~~~~~~~~
vim +/flags +357 sound/sparc/amd7930.c
353 354 /* Enable chip interrupts. The amd->lock is not held. */ 355 static __inline__ void amd7930_enable_ints(struct snd_amd7930 *amd) 356 {
357 guard(spinlock_irqsave)(&amd->lock, flags);
358 sbus_writeb(AMR_INIT, amd->regs + AMD7930_CR); 359 sbus_writeb(AM_INIT_ACTIVE, amd->regs + AMD7930_DR); 360 } 361
participants (1)
-
kernel test robot