From: kernel test robot <lkp@intel.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>,
Jonathan Cameron <jic23@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
"David Jander" <david@protonic.nl>,
"Oleksij Rempel" <o.rempel@pengutronix.de>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>
Subject: Re: [PATCH v1 2/2] iio: adc: Add TI ADS131M0x ADC driver
Date: Thu, 6 Nov 2025 19:21:44 +0800 [thread overview]
Message-ID: <202511061850.kYeqflcU-lkp@intel.com> (raw)
In-Reply-To: <20251105143814.1807444-3-o.rempel@pengutronix.de>
Hi Oleksij,
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-rc4 next-20251106]
[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/Oleksij-Rempel/bindings-iio-adc-Add-bindings-for-TI-ADS131M0x-ADCs/20251105-224149
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20251105143814.1807444-3-o.rempel%40pengutronix.de
patch subject: [PATCH v1 2/2] iio: adc: Add TI ADS131M0x ADC driver
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20251106/202511061850.kYeqflcU-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/20251106/202511061850.kYeqflcU-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/202511061850.kYeqflcU-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/iio/adc/ti-ads131m0x.c:174:2: error: call to undeclared function 'put_unaligned_be24'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
174 | put_unaligned_be24(command << 8, &priv->tx_buffer[0]);
| ^
drivers/iio/adc/ti-ads131m0x.c:163:6: warning: unused variable 'ret' [-Wunused-variable]
163 | int ret;
| ^~~
>> drivers/iio/adc/ti-ads131m0x.c:224:11: error: call to undeclared function 'get_unaligned_be16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
224 | status = get_unaligned_be16(&priv->rx_buffer[0]);
| ^
drivers/iio/adc/ti-ads131m0x.c:271:2: error: call to undeclared function 'put_unaligned_be24'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
271 | put_unaligned_be24(command << 8, &priv->tx_buffer[0]);
| ^
drivers/iio/adc/ti-ads131m0x.c:304:13: error: call to undeclared function 'get_unaligned_be16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
304 | response = get_unaligned_be16(&priv->rx_buffer[0]);
| ^
drivers/iio/adc/ti-ads131m0x.c:376:9: error: call to undeclared function 'get_unaligned_be16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
376 | *val = get_unaligned_be16(&priv->rx_buffer[0]);
| ^
drivers/iio/adc/ti-ads131m0x.c:461:17: error: call to undeclared function 'get_unaligned_be16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
461 | received_crc = get_unaligned_be16(&priv->rx_buffer[data_len]);
| ^
drivers/iio/adc/ti-ads131m0x.c:505:11: error: call to undeclared function 'get_unaligned_be16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
505 | status = get_unaligned_be16(&priv->rx_buffer[0]);
| ^
>> drivers/iio/adc/ti-ads131m0x.c:523:23: error: call to undeclared function 'get_unaligned_be24'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
523 | *val = sign_extend32(get_unaligned_be24(buf), 23);
| ^
drivers/iio/adc/ti-ads131m0x.c:706:13: error: call to undeclared function 'get_unaligned_be16'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
706 | response = get_unaligned_be16(&priv->rx_buffer[0]);
| ^
1 warning and 9 errors generated.
vim +/put_unaligned_be24 +174 drivers/iio/adc/ti-ads131m0x.c
149
150 /**
151 * ads131m_tx_frame_unlocked - Sends a command frame with Input CRC
152 * @priv: Device private data structure.
153 * @command: The 16-bit command to send (e.g., NULL, RREG, RESET).
154 *
155 * Assumes the mutex lock is held.
156 * This function sends a command in Word 0, and its calculated 16-bit
157 * CRC in Word 1, as required when Input CRC is enabled.
158 *
159 * Return: 0 on success, or a negative error code from spi_sync.
160 */
161 static int ads131m_tx_frame_unlocked(struct ads131m_priv *priv, u32 command)
162 {
163 int ret;
164 u16 crc;
165
166 /*
167 * Zero the entire TX buffer to send a valid frame.
168 */
169 memset(priv->tx_buffer, 0, ADS131M_FRAME_BSIZE(priv->num_channels));
170
171 /*
172 * Word 0: 16-bit command, MSB-aligned in 24-bit word.
173 */
> 174 put_unaligned_be24(command << 8, &priv->tx_buffer[0]);
175
176 /*
177 * Word 1: Input CRC
178 * Calculated over the 3 bytes of Word 0.
179 */
180 crc = ads131m_crc_calculate(priv->tx_buffer, 3);
181 put_unaligned_be24(crc << 8, &priv->tx_buffer[3]);
182
183 return spi_sync(priv->spi, &priv->msg);
184 }
185
186 /**
187 * ads131m_rx_frame_unlocked - Receives a full SPI data frame.
188 * @priv: Device private data structure.
189 *
190 * This function sends a NULL command (with its CRC) to clock out a
191 * full SPI frame from the device (e.g., response + channel data + CRC).
192 *
193 * Assumes the mutex lock is held.
194 *
195 * Return: 0 on success, or a negative error code from spi_sync.
196 */
197 static int ads131m_rx_frame_unlocked(struct ads131m_priv *priv)
198 {
199 return ads131m_tx_frame_unlocked(priv, ADS131M_CMD_NULL);
200 }
201
202 /**
203 * ads131m_check_status_crc_err - Checks for an Input CRC error.
204 * @priv: Device private data structure.
205 *
206 * Sends a NULL command to fetch the STATUS register and checks the
207 * CRC_ERR bit. This is used to verify the integrity of the previous
208 * command (like RREG or WREG).
209 *
210 * Context: This function assumes the mutex 'lock' is held.
211 * Return: 0 on success, -EIO if CRC_ERR bit is set.
212 */
213 static int ads131m_check_status_crc_err(struct ads131m_priv *priv)
214 {
215 int ret;
216 u16 status;
217
218 ret = ads131m_rx_frame_unlocked(priv);
219 if (ret < 0) {
220 dev_err(&priv->spi->dev, "SPI error on STATUS read for CRC check\n");
221 return ret;
222 }
223
> 224 status = get_unaligned_be16(&priv->rx_buffer[0]);
225 if (status & ADS131M_STATUS_CRC_ERR) {
226 dev_err(&priv->spi->dev, "Previous input CRC error, STATUS=0x%04x\n",
227 status);
228 return -EIO;
229 }
230
231 return 0;
232 }
233
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-06 11:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 14:38 [PATCH v1 0/2] iio: adc: Add support for TI ADS131M0x ADCs Oleksij Rempel
2025-11-05 14:38 ` [PATCH v1 1/2] bindings: iio: adc: Add bindings " Oleksij Rempel
2025-11-05 18:40 ` Jonathan Cameron
2025-11-06 16:06 ` David Lechner
2025-11-05 14:38 ` [PATCH v1 2/2] iio: adc: Add TI ADS131M0x ADC driver Oleksij Rempel
2025-11-05 14:51 ` Marc Kleine-Budde
2025-11-05 19:34 ` Jonathan Cameron
2025-11-06 7:53 ` kernel test robot
2025-11-06 8:03 ` kernel test robot
2025-11-06 11:21 ` kernel test robot [this message]
2025-11-06 16:57 ` David Lechner
2025-11-07 10:29 ` Oleksij Rempel
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=202511061850.kYeqflcU-lkp@intel.com \
--to=lkp@intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=conor+dt@kernel.org \
--cc=david@protonic.nl \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kernel@pengutronix.de \
--cc=krzk@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=o.rempel@pengutronix.de \
--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).