lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202411290140.7k2Z9JSi-lkp@intel.com>
Date: Fri, 29 Nov 2024 01:31:15 +0800
From: kernel test robot <lkp@...el.com>
To: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
	Matti Vaittinen <mazziesaccount@...il.com>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	Jonathan Cameron <jic23@...nel.org>,
	Lars-Peter Clausen <lars@...afoo.de>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, linux-iio@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 7/7] iio: accel: kx022a: align with subsystem way

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ