[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202511101707.NSNVObH4-lkp@intel.com>
Date: Mon, 10 Nov 2025 18:17:36 +0800
From: kernel test robot <lkp@...el.com>
To: Ajith Anandhan <ajithanandhan0406@...il.com>, jic23@...nel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
dlechner@...libre.com, nuno.sa@...log.com, andy@...nel.org,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Ajith Anandhan <ajithanandhan0406@...il.com>
Subject: Re: [PATCH v2 2/2] iio: adc: Add support for TI ADS1120
Hi Ajith,
kernel test robot noticed the following build errors:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linus/master v6.18-rc5 next-20251110]
[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/Ajith-Anandhan/dt-bindings-iio-adc-Add-TI-ADS1120-binding/20251109-221245
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20251109141119.561756-3-ajithanandhan0406%40gmail.com
patch subject: [PATCH v2 2/2] iio: adc: Add support for TI ADS1120
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20251110/202511101707.NSNVObH4-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251110/202511101707.NSNVObH4-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511101707.NSNVObH4-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> drivers/iio/adc/ti-ads1120.c:347:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
347 | guard(mutex)(&st->lock);
| ^
include/linux/cleanup.h:401:2: note: expanded from macro 'guard'
401 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/cleanup.h:290:2: note: expanded from macro 'CLASS'
290 | class_##_name##_t var __cleanup(class_##_name##_destructor) = \
| ^
<scratch space>:10:1: note: expanded from here
10 | class_mutex_t
| ^
>> drivers/iio/adc/ti-ads1120.c:366:2: error: cannot jump from switch statement to this case label
366 | default:
| ^
drivers/iio/adc/ti-ads1120.c:347:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
347 | guard(mutex)(&st->lock);
| ^
include/linux/cleanup.h:401:15: note: expanded from macro 'guard'
401 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/compiler.h:166:29: note: expanded from macro '__UNIQUE_ID'
166 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^
include/linux/compiler_types.h:84:22: note: expanded from macro '__PASTE'
84 | #define __PASTE(a,b) ___PASTE(a,b)
| ^
include/linux/compiler_types.h:83:23: note: expanded from macro '___PASTE'
83 | #define ___PASTE(a,b) a##b
| ^
<scratch space>:8:1: note: expanded from here
8 | __UNIQUE_ID_guard560
| ^
drivers/iio/adc/ti-ads1120.c:353:2: error: cannot jump from switch statement to this case label
353 | case IIO_CHAN_INFO_SCALE:
| ^
drivers/iio/adc/ti-ads1120.c:347:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
347 | guard(mutex)(&st->lock);
| ^
include/linux/cleanup.h:401:15: note: expanded from macro 'guard'
401 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/compiler.h:166:29: note: expanded from macro '__UNIQUE_ID'
166 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^
include/linux/compiler_types.h:84:22: note: expanded from macro '__PASTE'
84 | #define __PASTE(a,b) ___PASTE(a,b)
| ^
include/linux/compiler_types.h:83:23: note: expanded from macro '___PASTE'
83 | #define ___PASTE(a,b) a##b
| ^
<scratch space>:8:1: note: expanded from here
8 | __UNIQUE_ID_guard560
| ^
drivers/iio/adc/ti-ads1120.c:390:2: error: cannot jump from switch statement to this case label
390 | default:
| ^
drivers/iio/adc/ti-ads1120.c:387:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
387 | guard(mutex)(&st->lock);
| ^
include/linux/cleanup.h:401:15: note: expanded from macro 'guard'
401 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/compiler.h:166:29: note: expanded from macro '__UNIQUE_ID'
166 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^
include/linux/compiler_types.h:84:22: note: expanded from macro '__PASTE'
84 | #define __PASTE(a,b) ___PASTE(a,b)
| ^
include/linux/compiler_types.h:83:23: note: expanded from macro '___PASTE'
83 | #define ___PASTE(a,b) a##b
| ^
<scratch space>:17:1: note: expanded from here
17 | __UNIQUE_ID_guard561
| ^
1 warning and 3 errors generated.
vim +366 drivers/iio/adc/ti-ads1120.c
337
338 static int ads1120_read_raw(struct iio_dev *indio_dev,
339 struct iio_chan_spec const *chan,
340 int *val, int *val2, long mask)
341 {
342 struct ads1120_state *st = iio_priv(indio_dev);
343 int ret, gain;
344
345 switch (mask) {
346 case IIO_CHAN_INFO_RAW:
> 347 guard(mutex)(&st->lock);
348 ret = ads1120_read_measurement(st, chan, val);
349 if (ret)
350 return ret;
351 return IIO_VAL_INT;
352
353 case IIO_CHAN_INFO_SCALE:
354 /*
355 * Scale = Vref / (gain * 2^15)
356 * Return in format: val / 2^val2
357 */
358 gain = ads1120_get_gain(st);
359 if (gain < 0)
360 return gain;
361
362 *val = st->vref_mv;
363 *val2 = gain * 15;
364 return IIO_VAL_FRACTIONAL_LOG2;
365
> 366 default:
367 return -EINVAL;
368 }
369 }
370
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists