All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ajith Anandhan <ajithanandhan0406@gmail.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,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Ajith Anandhan <ajithanandhan0406@gmail.com>
Subject: Re: [PATCH v2 2/2] iio: adc: Add support for TI ADS1120
Date: Mon, 10 Nov 2025 18:17:36 +0800	[thread overview]
Message-ID: <202511101707.NSNVObH4-lkp@intel.com> (raw)
In-Reply-To: <20251109141119.561756-3-ajithanandhan0406@gmail.com>

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@intel.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

  parent reply	other threads:[~2025-11-10 10:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-09 14:11 [PATCH v2 0/2] iio: adc: ti-ads1120: Add driver and dt-binding Ajith Anandhan
2025-11-09 14:11 ` [PATCH v2 1/2] dt-bindings: iio: adc: Add TI ADS1120 binding Ajith Anandhan
2025-11-10  7:59   ` Krzysztof Kozlowski
2025-11-15 18:31   ` Jonathan Cameron
2025-11-18  0:19     ` David Lechner
2025-12-15 14:49       ` Ajith Anandhan
2025-12-15 15:58         ` David Lechner
2025-11-09 14:11 ` [PATCH v2 2/2] iio: adc: Add support for TI ADS1120 Ajith Anandhan
2025-11-09 17:03   ` Andy Shevchenko
2025-11-09 17:05     ` Andy Shevchenko
2025-11-10 10:17   ` kernel test robot [this message]
2025-11-15 18:45   ` Jonathan Cameron
2025-11-18 14:04   ` David Lechner
2025-12-15 16:13     ` Ajith Anandhan
2025-12-15 16:36       ` David Lechner
2025-12-15 16:49         ` Ajith Anandhan
2025-12-15 17:00           ` Andy Shevchenko
2025-12-15 17:38             ` Ajith Anandhan
2025-12-15 17:42           ` David Lechner
2025-12-15 17:50             ` Ajith Anandhan
2025-12-21 18:57             ` 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=202511101707.NSNVObH4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ajithanandhan0406@gmail.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.