Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] iio: light: add ams OSRAM TCS3430 XYZ and ambient light sensor driver
       [not found] <20261124-iio-tcs3430-v1-2-0f2a38a6a4c1@gmail.com>
@ 2026-11-25  6:28 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-25  6:28 UTC (permalink / raw)
  To: Robert Ijtsma via B4 Relay, Jonathan Cameron, David Lechner,
	Nuno Sá, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: llvm, oe-kbuild-all, linux-iio, devicetree, linux-kernel,
	Robert Ijtsma

Hi Robert,

kernel test robot noticed the following build errors:

[auto build test ERROR on 4843f6873f7c4835e62f2c73ba0fd538e57a2f22]

url:    https://github.com/intel-lab-lkp/linux/commits/Robert-Ijtsma-via-B4-Relay/dt-bindings-iio-light-add-ams-OSRAM-TCS3430/20261124-234657
base:   4843f6873f7c4835e62f2c73ba0fd538e57a2f22
patch link:    https://lore.kernel.org/r/20261124-iio-tcs3430-v1-2-0f2a38a6a4c1%40gmail.com
patch subject: [PATCH 2/2] iio: light: add ams OSRAM TCS3430 XYZ and ambient light sensor driver
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20261125/20261125142230.FjfgcgpD-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261125/20261125142230.FjfgcgpD-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/20261125142230.FjfgcgpD-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/iio/light/tcs3430.c:175:2: error: cannot jump from switch statement to this case label
     175 |         default:
         |         ^
   drivers/iio/light/tcs3430.c:166:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
     166 |                 guard(mutex)(&data->lock);
         |                 ^
   include/linux/cleanup.h:416:2: note: expanded from macro 'guard'
     416 |         CLASS(_name, __UNIQUE_ID(guard))
         |         ^
   include/linux/cleanup.h:299:3: note: expanded from macro 'CLASS'
     299 |                 class_##_name##_constructor
         |                 ^
   <scratch space>:22:1: note: expanded from here
      22 | 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>:28:1: note: expanded from here
      28 | __UNIQUE_ID_unlock_541
         | ^
   drivers/iio/light/tcs3430.c:166:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
   include/linux/cleanup.h:416:15: note: expanded from macro 'guard'
     416 |         CLASS(_name, __UNIQUE_ID(guard))
         |                      ^
   include/linux/compiler.h:165:2: note: expanded from macro '__UNIQUE_ID'
     165 |         __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>:16:1: note: expanded from here
      16 | __UNIQUE_ID_guard_540
         | ^
   drivers/iio/light/tcs3430.c:142:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
     142 |                 guard(mutex)(&data->lock);
         |                 ^
   include/linux/cleanup.h:416:2: note: expanded from macro 'guard'
     416 |         CLASS(_name, __UNIQUE_ID(guard))
         |         ^
   include/linux/cleanup.h:299:3: note: expanded from macro 'CLASS'
     299 |                 class_##_name##_constructor
         |                 ^
   <scratch space>:17:1: note: expanded from here
      17 | 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>:23:1: note: expanded from here
      23 | __UNIQUE_ID_unlock_537
         | ^
   drivers/iio/light/tcs3430.c:142:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
   include/linux/cleanup.h:416:15: note: expanded from macro 'guard'
     416 |         CLASS(_name, __UNIQUE_ID(guard))
         |                      ^
   include/linux/compiler.h:165:2: note: expanded from macro '__UNIQUE_ID'
     165 |         __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>:11:1: note: expanded from here
      11 | __UNIQUE_ID_guard_536
         | ^
   drivers/iio/light/tcs3430.c:170:2: error: cannot jump from switch statement to this case label
     170 |         case IIO_CHAN_INFO_INT_TIME:
         |         ^
   drivers/iio/light/tcs3430.c:166:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
     166 |                 guard(mutex)(&data->lock);
         |                 ^
   include/linux/cleanup.h:416:2: note: expanded from macro 'guard'
     416 |         CLASS(_name, __UNIQUE_ID(guard))
         |         ^
   include/linux/cleanup.h:299:3: note: expanded from macro 'CLASS'
     299 |                 class_##_name##_constructor
         |                 ^
   <scratch space>:22:1: note: expanded from here
      22 | 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
         |                        ^


vim +175 drivers/iio/light/tcs3430.c

   132	
   133	static int tcs3430_read_raw(struct iio_dev *indio_dev,
   134				    const struct iio_chan_spec *chan,
   135				    int *val, int *val2, long mask)
   136	{
   137		struct tcs3430_data *data = iio_priv(indio_dev);
   138		int ret;
   139	
   140		switch (mask) {
   141		case IIO_CHAN_INFO_RAW:
   142			guard(mutex)(&data->lock);
   143			ret = i2c_smbus_read_word_data(data->client, chan->address);
   144			if (ret < 0)
   145				return ret;
   146			*val = ret;
   147			return IIO_VAL_INT;
   148	
   149		case IIO_CHAN_INFO_SCALE: {
   150			u32 itime_us = TCS3430_DEFAULT_ATIME_CYCLES * TCS3430_ATIME_STEP_US;
   151			u64 scale_nano;
   152			u32 rem;
   153			int gain;
   154	
   155			scoped_guard(mutex, &data->lock)
   156				gain = tcs3430_gains[data->gain_idx];
   157	
   158			scale_nano = div_u64(TCS3430_LUX_FACTOR * NSEC_PER_SEC * USEC_PER_MSEC,
   159					     (u32)gain * itime_us);
   160			*val = div_u64_rem(scale_nano, NSEC_PER_SEC, &rem);
   161			*val2 = rem;
   162			return IIO_VAL_INT_PLUS_NANO;
   163		}
   164	
   165		case IIO_CHAN_INFO_HARDWAREGAIN:
   166			guard(mutex)(&data->lock);
   167			*val = tcs3430_gains[data->gain_idx];
   168			return IIO_VAL_INT;
   169	
   170		case IIO_CHAN_INFO_INT_TIME:
   171			*val = 0;
   172			*val2 = TCS3430_DEFAULT_ATIME_CYCLES * TCS3430_ATIME_STEP_US;
   173			return IIO_VAL_INT_PLUS_MICRO;
   174	
 > 175		default:
   176			return -EINVAL;
   177		}
   178	}
   179	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-25  6:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261124-iio-tcs3430-v1-2-0f2a38a6a4c1@gmail.com>
2026-11-25  6:28 ` [PATCH 2/2] iio: light: add ams OSRAM TCS3430 XYZ and ambient light sensor driver kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox