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] [day] [month] [year] [list]
Message-ID: <202510020803.3pQv1jeZ-lkp@intel.com>
Date: Thu, 2 Oct 2025 08:13:40 +0800
From: kernel test robot <lkp@...el.com>
To: victor.duicu@...rochip.com, jic23@...nel.org, dlechner@...libre.com,
	nuno.sa@...log.com, andy@...nel.org, robh@...nel.org,
	krzk+dt@...nel.org, conor+dt@...nel.org
Cc: oe-kbuild-all@...ts.linux.dev, marius.cristea@...rochip.com,
	victor.duicu@...rochip.com, linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v6 2/2] iio: temperature: add support for MCP998X

Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on 561285d048053fec8a3d6d1e3ddc60df11c393a0]

url:    https://github.com/intel-lab-lkp/linux/commits/victor-duicu-microchip-com/dt-bindings-iio-temperature-add-support-for-MCP998X/20250930-213443
base:   561285d048053fec8a3d6d1e3ddc60df11c393a0
patch link:    https://lore.kernel.org/r/20250930133131.13797-3-victor.duicu%40microchip.com
patch subject: [PATCH v6 2/2] iio: temperature: add support for MCP998X
config: i386-randconfig-013-20251002 (https://download.01.org/0day-ci/archive/20251002/202510020803.3pQv1jeZ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251002/202510020803.3pQv1jeZ-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/202510020803.3pQv1jeZ-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/iio/temperature/mcp9982.c: In function 'mcp9982_read_raw':
>> drivers/iio/temperature/mcp9982.c:467:24: error: implicit declaration of function 'get_unaligned_be16' [-Werror=implicit-function-declaration]
     467 |                 *val = get_unaligned_be16(bulk_read + 1);
         |                        ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/get_unaligned_be16 +467 drivers/iio/temperature/mcp9982.c

   416	
   417	static int mcp9982_read_raw(struct iio_dev *indio_dev,
   418				    struct iio_chan_spec const *chan, int *val,
   419				    int *val2, long mask)
   420	{
   421		unsigned int tmp_reg, reg_status;
   422		struct mcp9982_priv *priv = iio_priv(indio_dev);
   423		unsigned long *src;
   424		int ret;
   425		u8 bulk_read[3];
   426	
   427		if (priv->run_state) {
   428			/*
   429			 * When working in Run mode, after modifying a parameter (like sampling
   430			 * frequency) we have to wait a delay before reading the new values.
   431			 * We can't determine when the conversion is done based on the BUSY bit.
   432			 */
   433			if (priv->wait_before_read) {
   434				if (!time_after(jiffies, priv->time_limit))
   435					mdelay(jiffies_to_msecs(priv->time_limit - jiffies));
   436				priv->wait_before_read = false;
   437			}
   438		} else {
   439			ret = regmap_write(priv->regmap, MCP9982_ONE_SHOT_ADDR, 1);
   440			if (ret)
   441				return ret;
   442			/*
   443			 * In Standby state after writing in OneShot register wait for
   444			 * the start of conversion and then poll the BUSY bit.
   445			 */
   446			mdelay(125);
   447			ret = regmap_read_poll_timeout(priv->regmap, MCP9982_STATUS_ADDR,
   448						       reg_status, !(reg_status & MCP9982_STATUS_BUSY),
   449						       mcp9982_delay_ms[priv->sampl_idx] * USEC_PER_MSEC,
   450						       0);
   451			if (ret)
   452				return ret;
   453		}
   454		guard(mutex)(&priv->lock);
   455	
   456		switch (mask) {
   457		case IIO_CHAN_INFO_RAW:
   458			/*
   459			 * The Block Read Protocol first returns the number of user readable
   460			 * bytes, held in bulk_read[0], followed by the data.
   461			 */
   462			ret = regmap_bulk_read(priv->regmap, MCP9982_TEMP_MEM_BLOCK_ADDR(chan->channel),
   463					       &bulk_read, sizeof(bulk_read));
   464			if (ret)
   465				return ret;
   466	
 > 467			*val = get_unaligned_be16(bulk_read + 1);
   468	
   469			return IIO_VAL_INT;
   470		case IIO_CHAN_INFO_SCALE:
   471			*val = 0;
   472			*val2 = MCP9982_SCALE;
   473			return IIO_VAL_INT_PLUS_NANO;
   474		case IIO_CHAN_INFO_SAMP_FREQ:
   475			*val = mcp9982_conv_rate[priv->sampl_idx][0];
   476			*val2 = mcp9982_conv_rate[priv->sampl_idx][1];
   477			return IIO_VAL_INT_PLUS_MICRO;
   478		case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY:
   479			ret = regmap_read(priv->regmap, MCP9982_RUNNING_AVG_ADDR, &tmp_reg);
   480			if (ret)
   481				return ret;
   482			*src = tmp_reg;
   483			*val = mcp9982_3db_values_map_tbl[priv->sampl_idx][bitmap_weight(src, 2)][0];
   484			*val2 = mcp9982_3db_values_map_tbl[priv->sampl_idx][bitmap_weight(src, 2)][1];
   485			return IIO_VAL_INT_PLUS_MICRO;
   486		case IIO_CHAN_INFO_OFFSET:
   487			*val = MCP9982_OFFSET;
   488			return IIO_VAL_INT;
   489		default:
   490			return -EINVAL;
   491		}
   492	}
   493	

-- 
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