Re: [PATCH] iio: adc: ad7280a: replace mutex_lock() with guard(mutex)
From: kernel test robot
Date: Fri Mar 20 2026 - 15:56:16 EST
Hi Matheus,
kernel test robot noticed the following build errors:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linus/master v7.0-rc4 next-20260320]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Matheus-Giarola/iio-adc-ad7280a-replace-mutex_lock-with-guard-mutex/20260320-142509
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20260319184615.10970-1-matheusgiarola%40usp.br
patch subject: [PATCH] iio: adc: ad7280a: replace mutex_lock() with guard(mutex)
config: parisc-randconfig-002-20260321 (https://download.01.org/0day-ci/archive/20260321/202603210357.KTWqlL36-lkp@xxxxxxxxx/config)
compiler: hppa-linux-gcc (GCC) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260321/202603210357.KTWqlL36-lkp@xxxxxxxxx/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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603210357.KTWqlL36-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from drivers/iio/adc/ad7280a.c:10:
drivers/iio/adc/ad7280a.c: In function 'ad7280_read_raw':
>> include/linux/cleanup.h:299:2: error: a label can only be part of a statement and a declaration is not a statement
299 | class_##_name##_t var __cleanup(class_##_name##_destructor) = \
| ^~~~~~
include/linux/cleanup.h:419:2: note: in expansion of macro 'CLASS'
419 | CLASS(_name, __UNIQUE_ID(guard))
| ^~~~~
drivers/iio/adc/ad7280a.c:878:3: note: in expansion of macro 'guard'
878 | guard(mutex)(&st->lock);
| ^~~~~
--
In file included from ad7280a.c:10:
ad7280a.c: In function 'ad7280_read_raw':
>> include/linux/cleanup.h:299:2: error: a label can only be part of a statement and a declaration is not a statement
299 | class_##_name##_t var __cleanup(class_##_name##_destructor) = \
| ^~~~~~
include/linux/cleanup.h:419:2: note: in expansion of macro 'CLASS'
419 | CLASS(_name, __UNIQUE_ID(guard))
| ^~~~~
ad7280a.c:878:3: note: in expansion of macro 'guard'
878 | guard(mutex)(&st->lock);
| ^~~~~
vim +299 include/linux/cleanup.h
54da6a0924311c Peter Zijlstra 2023-05-26 297
54da6a0924311c Peter Zijlstra 2023-05-26 298 #define CLASS(_name, var) \
54da6a0924311c Peter Zijlstra 2023-05-26 @299 class_##_name##_t var __cleanup(class_##_name##_destructor) = \
54da6a0924311c Peter Zijlstra 2023-05-26 300 class_##_name##_constructor
54da6a0924311c Peter Zijlstra 2023-05-26 301
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki