From: kernel test robot <lkp@intel.com>
To: Matheus Giarola <matheustpgiarola@gmail.com>,
lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
matheusgiarola@usp.br, arthurpilone@usp.br,
davidbtadokoro@ime.usp.br
Subject: Re: [PATCH] iio: adc: ad7280a: replace mutex_lock() with guard(mutex)
Date: Sat, 21 Mar 2026 04:16:11 +0800 [thread overview]
Message-ID: <202603210411.t4KwH3aX-lkp@intel.com> (raw)
In-Reply-To: <20260319184615.10970-1-matheusgiarola@usp.br>
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: arm-randconfig-004-20260321 (https://download.01.org/0day-ci/archive/20260321/202603210411.t4KwH3aX-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 4abb927bacf37f18f6359a41639a6d1b3bffffb5)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260321/202603210411.t4KwH3aX-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603210411.t4KwH3aX-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/iio/adc/ad7280a.c:899:2: error: cannot jump from switch statement to this case label
899 | case IIO_CHAN_INFO_OVERSAMPLING_RATIO:
| ^
drivers/iio/adc/ad7280a.c:878:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
878 | guard(mutex)(&st->lock);
| ^
include/linux/cleanup.h:419:2: note: expanded from macro 'guard'
419 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/cleanup.h:300:3: note: expanded from macro 'CLASS'
300 | class_##_name##_constructor
| ^
<scratch space>:15:1: note: expanded from here
15 | class_mutex_constructor
| ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
16 | #define __PASTE(a, b) ___PASTE(a, b)
| ^
include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
15 | #define ___PASTE(a, b) a##b
| ^
<scratch space>:21:1: note: expanded from here
21 | __UNIQUE_ID_unlock_538
| ^
drivers/iio/adc/ad7280a.c:878:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
include/linux/cleanup.h:419:15: note: expanded from macro 'guard'
419 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/compiler.h:168:2: note: expanded from macro '__UNIQUE_ID'
168 | __PASTE(__UNIQUE_ID_, \
| ^
include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
16 | #define __PASTE(a, b) ___PASTE(a, b)
| ^
include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
15 | #define ___PASTE(a, b) a##b
| ^
<scratch space>:9:1: note: expanded from here
9 | __UNIQUE_ID_guard_537
| ^
drivers/iio/adc/ad7280a.c:891:2: error: cannot jump from switch statement to this case label
891 | case IIO_CHAN_INFO_SCALE:
| ^
drivers/iio/adc/ad7280a.c:878:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
878 | guard(mutex)(&st->lock);
| ^
include/linux/cleanup.h:419:2: note: expanded from macro 'guard'
419 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/cleanup.h:300:3: note: expanded from macro 'CLASS'
300 | class_##_name##_constructor
| ^
<scratch space>:15:1: note: expanded from here
15 | class_mutex_constructor
| ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
16 | #define __PASTE(a, b) ___PASTE(a, b)
| ^
include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
15 | #define ___PASTE(a, b) a##b
| ^
<scratch space>:21:1: note: expanded from here
21 | __UNIQUE_ID_unlock_538
| ^
drivers/iio/adc/ad7280a.c:878:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
include/linux/cleanup.h:419:15: note: expanded from macro 'guard'
419 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/compiler.h:168:2: note: expanded from macro '__UNIQUE_ID'
168 | __PASTE(__UNIQUE_ID_, \
| ^
include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
16 | #define __PASTE(a, b) ___PASTE(a, b)
| ^
include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
15 | #define ___PASTE(a, b) a##b
| ^
<scratch space>:9:1: note: expanded from here
9 | __UNIQUE_ID_guard_537
| ^
2 errors generated.
vim +899 drivers/iio/adc/ad7280a.c
c5fe2f537b91e17 drivers/staging/iio/adc/ad7280a.c Jonathan Cameron 2022-02-06 866
84f79ecb0c1f393 drivers/staging/iio/adc/ad7280a.c Jonathan Cameron 2011-10-06 867 static int ad7280_read_raw(struct iio_dev *indio_dev,
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 868 struct iio_chan_spec const *chan,
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 869 int *val,
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 870 int *val2,
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 871 long m)
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 872 {
84f79ecb0c1f393 drivers/staging/iio/adc/ad7280a.c Jonathan Cameron 2011-10-06 873 struct ad7280_state *st = iio_priv(indio_dev);
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 874 int ret;
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 875
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 876 switch (m) {
b11f98ff8c35d62 drivers/staging/iio/adc/ad7280a.c Jonathan Cameron 2012-04-15 877 case IIO_CHAN_INFO_RAW:
801020aafb667e4 drivers/iio/adc/ad7280a.c Matheus Giarola 2026-03-19 878 guard(mutex)(&st->lock);
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 879 if (chan->address == AD7280A_ALL_CELLS)
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 880 ret = ad7280_read_all_channels(st, st->scan_cnt, NULL);
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 881 else
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 882 ret = ad7280_read_channel(st, chan->address >> 8,
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 883 chan->address & 0xFF);
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 884
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 885 if (ret < 0)
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 886 return ret;
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 887
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 888 *val = ret;
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 889
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 890 return IIO_VAL_INT;
c8a9f8056f40f62 drivers/staging/iio/adc/ad7280a.c Jonathan Cameron 2011-10-26 891 case IIO_CHAN_INFO_SCALE:
4c59aabd9a93d8f drivers/staging/iio/adc/ad7280a.c Jonathan Cameron 2022-02-06 892 if ((chan->address & 0xFF) <= AD7280A_CELL_VOLTAGE_6_REG)
d6570b33a1c0620 drivers/staging/iio/adc/ad7280a.c Lars-Peter Clausen 2013-09-28 893 *val = 4000;
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 894 else
d6570b33a1c0620 drivers/staging/iio/adc/ad7280a.c Lars-Peter Clausen 2013-09-28 895 *val = 5000;
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 896
d6570b33a1c0620 drivers/staging/iio/adc/ad7280a.c Lars-Peter Clausen 2013-09-28 897 *val2 = AD7280A_BITS;
d6570b33a1c0620 drivers/staging/iio/adc/ad7280a.c Lars-Peter Clausen 2013-09-28 898 return IIO_VAL_FRACTIONAL_LOG2;
c5fe2f537b91e17 drivers/staging/iio/adc/ad7280a.c Jonathan Cameron 2022-02-06 @899 case IIO_CHAN_INFO_OVERSAMPLING_RATIO:
c5fe2f537b91e17 drivers/staging/iio/adc/ad7280a.c Jonathan Cameron 2022-02-06 900 *val = ad7280a_n_avg[st->oversampling_ratio];
c5fe2f537b91e17 drivers/staging/iio/adc/ad7280a.c Jonathan Cameron 2022-02-06 901 return IIO_VAL_INT;
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 902 }
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 903 return -EINVAL;
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 904 }
2051f25d2a26573 drivers/staging/iio/adc/ad7280a.c Michael Hennerich 2011-07-20 905
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-20 20:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 18:46 Matheus Giarola
2026-03-20 19:53 ` kernel test robot
2026-03-20 20:16 ` kernel test robot [this message]
2026-03-21 15:55 ` Jonathan Cameron
2026-03-25 19:21 ` Matheus Giarola
2026-03-25 20:32 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603210411.t4KwH3aX-lkp@intel.com \
--to=lkp@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=arthurpilone@usp.br \
--cc=davidbtadokoro@ime.usp.br \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=matheusgiarola@usp.br \
--cc=matheustpgiarola@gmail.com \
--cc=nuno.sa@analog.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®