devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
	Matti Vaittinen <mazziesaccount@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 7/7] iio: accel: kx022a: align with subsystem way
Date: Fri, 29 Nov 2024 01:31:15 +0800	[thread overview]
Message-ID: <202411290140.7k2Z9JSi-lkp@intel.com> (raw)
In-Reply-To: <9b63813ecf10b1cd0126cb950bc09514c4287b9a.1732783834.git.mazziesaccount@gmail.com>

Hi Matti,

kernel test robot noticed the following build errors:

[auto build test ERROR on a61ff7eac77e86de828fe28c4e42b8ae9ec2b195]

url:    https://github.com/intel-lab-lkp/linux/commits/Matti-Vaittinen/iio-accel-kx022a-Use-cleanup-h-helpers/20241128-170626
base:   a61ff7eac77e86de828fe28c4e42b8ae9ec2b195
patch link:    https://lore.kernel.org/r/9b63813ecf10b1cd0126cb950bc09514c4287b9a.1732783834.git.mazziesaccount%40gmail.com
patch subject: [PATCH v3 7/7] iio: accel: kx022a: align with subsystem way
config: i386-buildonly-randconfig-003-20241128 (https://download.01.org/0day-ci/archive/20241129/202411290140.7k2Z9JSi-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241129/202411290140.7k2Z9JSi-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/202411290140.7k2Z9JSi-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/iio/accel/kionix-kx022a.c:17:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:21:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/iio/accel/kionix-kx022a.c:507:2: error: call to undeclared function 'if_not_cond_guard'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     507 |         if_not_cond_guard(iio_claim_direct_try, idev)
         |         ^
>> drivers/iio/accel/kionix-kx022a.c:507:47: error: expected ';' after expression
     507 |         if_not_cond_guard(iio_claim_direct_try, idev)
         |                                                      ^
         |                                                      ;
>> drivers/iio/accel/kionix-kx022a.c:507:20: error: use of undeclared identifier 'iio_claim_direct_try'
     507 |         if_not_cond_guard(iio_claim_direct_try, idev)
         |                           ^
   1 warning and 3 errors generated.


vim +/if_not_cond_guard +507 drivers/iio/accel/kionix-kx022a.c

   490	
   491	static int kx022a_write_raw(struct iio_dev *idev,
   492				    struct iio_chan_spec const *chan,
   493				    int val, int val2, long mask)
   494	{
   495		struct kx022a_data *data = iio_priv(idev);
   496		int ret, n;
   497	
   498		/*
   499		 * We should not allow changing scale or frequency when FIFO is running
   500		 * as it will mess the timestamp/scale for samples existing in the
   501		 * buffer. If this turns out to be an issue we can later change logic
   502		 * to internally flush the fifo before reconfiguring so the samples in
   503		 * fifo keep matching the freq/scale settings. (Such setup could cause
   504		 * issues if users trust the watermark to be reached within known
   505		 * time-limit).
   506		 */
 > 507		if_not_cond_guard(iio_claim_direct_try, idev)
   508			return -EBUSY;
   509	
   510		switch (mask) {
   511		case IIO_CHAN_INFO_SAMP_FREQ:
   512			n = ARRAY_SIZE(kx022a_accel_samp_freq_table);
   513	
   514			while (n--)
   515				if (val == kx022a_accel_samp_freq_table[n][0] &&
   516				    val2 == kx022a_accel_samp_freq_table[n][1])
   517					break;
   518			if (n < 0)
   519				return -EINVAL;
   520	
   521			scoped_guard(mutex, &data->mutex) {
   522				ret = kx022a_turn_on_off(data, false);
   523				if (ret)
   524					return ret;
   525	
   526				ret = regmap_update_bits(data->regmap,
   527							 data->chip_info->odcntl,
   528							 KX022A_MASK_ODR, n);
   529				data->odr_ns = kx022a_odrs[n];
   530				return kx022a_turn_on_off(data, true);
   531			}
   532		case IIO_CHAN_INFO_SCALE:
   533			n = data->chip_info->scale_table_size / 2;
   534	
   535			while (n-- > 0)
   536				if (val == data->chip_info->scale_table[n][0] &&
   537				    val2 == data->chip_info->scale_table[n][1])
   538					break;
   539			if (n < 0)
   540				return -EINVAL;
   541	
   542			scoped_guard(mutex, &data->mutex) {
   543				ret = kx022a_turn_on_off(data, false);
   544				if (ret)
   545					return ret;
   546	
   547				ret = regmap_update_bits(data->regmap,
   548							 data->chip_info->cntl,
   549							 KX022A_MASK_GSEL,
   550							 n << KX022A_GSEL_SHIFT);
   551				kx022a_turn_on_off(data, true);
   552	
   553				return ret;
   554			}
   555		default:
   556			break;
   557		}
   558	
   559		return -EINVAL;
   560	}
   561	

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

  parent reply	other threads:[~2024-11-28 17:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-28  9:01 [PATCH v3 0/7] Support ROHM KX134ACR-LBZ Matti Vaittinen
2024-11-28  9:01 ` [PATCH v3 1/7] iio: accel: kx022a: Use cleanup.h helpers Matti Vaittinen
2024-11-30 18:05   ` Jonathan Cameron
2024-11-28  9:02 ` [PATCH v3 2/7] iio: accel: kx022a: Support ICs with different G-ranges Matti Vaittinen
2024-12-02 10:25   ` Mehdi Djait
2024-12-02 11:05     ` Matti Vaittinen
2024-11-28  9:02 ` [PATCH v3 3/7] dt-bindings: ROHM KX134ACR-LBZ Matti Vaittinen
2024-11-28  9:02 ` [PATCH v3 4/7] iio: kx022a: Support " Matti Vaittinen
2024-11-30 18:06   ` Jonathan Cameron
2024-11-28  9:03 ` [PATCH v3 5/7] dt-bindings: iio: kx022a: Support KX134-1211 Matti Vaittinen
2024-11-28  9:03 ` [PATCH v3 6/7] iio: accel: " Matti Vaittinen
2024-11-30 18:07   ` Jonathan Cameron
2024-11-28  9:03 ` [PATCH v3 7/7] iio: accel: kx022a: align with subsystem way Matti Vaittinen
2024-11-28 17:20   ` kernel test robot
2024-11-30 18:08     ` Jonathan Cameron
2024-11-28 17:31   ` kernel test robot [this message]
2024-11-28 17:52   ` kernel test robot
2024-11-30 18:15   ` Jonathan Cameron
2024-11-30 18:26     ` Jonathan Cameron
2024-12-02  6:46       ` Matti Vaittinen

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=202411290140.7k2Z9JSi-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).