devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: victor.duicu@microchip.com, jic23@kernel.org,
	dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, marius.cristea@microchip.com,
	victor.duicu@microchip.com, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v6 2/2] iio: temperature: add support for MCP998X
Date: Thu, 2 Oct 2025 08:13:40 +0800	[thread overview]
Message-ID: <202510020803.3pQv1jeZ-lkp@intel.com> (raw)
In-Reply-To: <20250930133131.13797-3-victor.duicu@microchip.com>

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

  reply	other threads:[~2025-10-02  0:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-30 13:31 [PATCH v6 0/2] add support for MCP998X victor.duicu
2025-09-30 13:31 ` [PATCH v6 1/2] dt-bindings: iio: temperature: " victor.duicu
2025-09-30 13:31 ` [PATCH v6 2/2] " victor.duicu
2025-10-02  0:13   ` kernel test robot [this message]
2025-10-04 14:17   ` Jonathan Cameron
2025-10-04 14:11 ` [PATCH v6 0/2] " Jonathan Cameron
2025-10-04 14:29   ` Guenter Roeck

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=202510020803.3pQv1jeZ-lkp@intel.com \
    --to=lkp@intel.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=marius.cristea@microchip.com \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=victor.duicu@microchip.com \
    /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).