From: kernel test robot <lkp@intel.com>
To: John Erasmus Mari Geronimo <johnerasmusmari.geronimo@analog.com>,
linux-iio@vger.kernel.org, jic23@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] iio: temperature: add support for Analog Devices MAX30210
Date: Thu, 5 Mar 2026 08:34:01 +0800 [thread overview]
Message-ID: <202603050819.rN8MJLQm-lkp@intel.com> (raw)
In-Reply-To: <20260304122509.67931-3-johnerasmusmari.geronimo@analog.com>
Hi John,
kernel test robot noticed the following build errors:
[auto build test ERROR on 70a9ae59c5b1f2f5501e78e2d85bfeefd153f854]
url: https://github.com/intel-lab-lkp/linux/commits/John-Erasmus-Mari-Geronimo/dt-bindings-iio-temperature-add-ADI-MAX30210/20260304-202920
base: 70a9ae59c5b1f2f5501e78e2d85bfeefd153f854
patch link: https://lore.kernel.org/r/20260304122509.67931-3-johnerasmusmari.geronimo%40analog.com
patch subject: [PATCH v2 2/2] iio: temperature: add support for Analog Devices MAX30210
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260305/202603050819.rN8MJLQm-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 9a109fbb6e184ec9bcce10615949f598f4c974a9)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260305/202603050819.rN8MJLQm-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/202603050819.rN8MJLQm-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/iio/temperature/max30210.c:136:13: error: call to undeclared function 'get_unaligned_be24'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
136 | u32 raw = get_unaligned_be24(&st->fifo_buf[3 * i]);
| ^
>> drivers/iio/temperature/max30210.c:272:11: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
272 | return FIELD_GET(MAX30210_STATUS_TEMP_HI_MASK, val);
| ^
drivers/iio/temperature/max30210.c:279:11: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
279 | return FIELD_GET(MAX30210_STATUS_TEMP_LO_MASK, val);
| ^
drivers/iio/temperature/max30210.c:336:10: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
336 | uval = FIELD_GET(MAX30210_TEMPCONF2_TEMP_PERIOD_MASK, uval);
| ^
>> drivers/iio/temperature/max30210.c:418:7: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
418 | FIELD_PREP(MAX30210_TEMPCONF2_TEMP_PERIOD_MASK, i));
| ^
5 errors generated.
vim +/get_unaligned_be24 +136 drivers/iio/temperature/max30210.c
122
123 static void max30210_fifo_read(struct iio_dev *indio_dev)
124 {
125 struct max30210_state *st = iio_priv(indio_dev);
126 int ret;
127
128 ret = regmap_bulk_read(st->regmap, MAX30210_FIFO_DATA_REG,
129 st->fifo_buf, 3 * st->watermark);
130 if (ret) {
131 dev_err(&indio_dev->dev, "Failed to read from fifo.\n");
132 return;
133 }
134
135 for (unsigned int i = 0; i < st->watermark; i++) {
> 136 u32 raw = get_unaligned_be24(&st->fifo_buf[3 * i]);
137
138 if (raw == MAX30210_FIFO_INVAL_DATA) {
139 dev_err_ratelimited(&indio_dev->dev, "Invalid data\n");
140 continue;
141 }
142
143 s16 temp = (s16)(raw & 0xFFFF);
144
145 iio_push_to_buffers(indio_dev, &temp);
146 }
147 }
148
149 static irqreturn_t max30210_irq_handler(int irq, void *dev_id)
150 {
151 struct iio_dev *indio_dev = dev_id;
152 struct max30210_state *st = iio_priv(indio_dev);
153 unsigned int status;
154 int ret;
155
156 ret = regmap_read(st->regmap, MAX30210_STATUS_REG, &status);
157 if (ret) {
158 dev_err(&indio_dev->dev, "Status read failed\n");
159 return IRQ_NONE;
160 }
161
162 if (status & MAX30210_STATUS_A_FULL_MASK)
163 max30210_fifo_read(indio_dev);
164
165 if (status & MAX30210_STATUS_TEMP_HI_MASK)
166 iio_push_event(indio_dev,
167 IIO_UNMOD_EVENT_CODE(IIO_TEMP, 0,
168 IIO_EV_TYPE_THRESH,
169 IIO_EV_DIR_RISING),
170 iio_get_time_ns(indio_dev));
171
172 if (status & MAX30210_STATUS_TEMP_LO_MASK)
173 iio_push_event(indio_dev,
174 IIO_UNMOD_EVENT_CODE(IIO_TEMP, 0,
175 IIO_EV_TYPE_THRESH,
176 IIO_EV_DIR_FALLING),
177 iio_get_time_ns(indio_dev));
178
179 return IRQ_HANDLED;
180 }
181
182 static int max30210_reg_access(struct iio_dev *indio_dev, unsigned int reg,
183 unsigned int writeval, unsigned int *readval)
184 {
185 struct max30210_state *st = iio_priv(indio_dev);
186
187 if (!readval)
188 return regmap_write(st->regmap, reg, writeval);
189
190 return regmap_read(st->regmap, reg, readval);
191 }
192
193 static int max30210_read_event(struct iio_dev *indio_dev,
194 const struct iio_chan_spec *chan,
195 enum iio_event_type type,
196 enum iio_event_direction dir,
197 enum iio_event_info info, int *val, int *val2)
198 {
199 struct max30210_state *st = iio_priv(indio_dev);
200
201 if (info != IIO_EV_INFO_VALUE)
202 return -EINVAL;
203
204 switch (dir) {
205 case IIO_EV_DIR_RISING:
206 switch (type) {
207 case IIO_EV_TYPE_THRESH:
208 return max30210_read_temp(st->regmap, MAX30210_TEMP_ALM_HI_REG, val);
209 default:
210 return -EINVAL;
211 }
212 case IIO_EV_DIR_FALLING:
213 switch (type) {
214 case IIO_EV_TYPE_THRESH:
215 return max30210_read_temp(st->regmap, MAX30210_TEMP_ALM_LO_REG, val);
216 default:
217 return -EINVAL;
218 }
219 default:
220 return -EINVAL;
221 }
222 }
223
224 static int max30210_write_event(struct iio_dev *indio_dev,
225 const struct iio_chan_spec *chan,
226 enum iio_event_type type,
227 enum iio_event_direction dir,
228 enum iio_event_info info, int val, int val2)
229 {
230 struct max30210_state *st = iio_priv(indio_dev);
231
232 if (info != IIO_EV_INFO_VALUE)
233 return -EINVAL;
234
235 switch (dir) {
236 case IIO_EV_DIR_RISING:
237 switch (type) {
238 case IIO_EV_TYPE_THRESH:
239 return max30210_write_temp(st->regmap, MAX30210_TEMP_ALM_HI_REG, val);
240 default:
241 return -EINVAL;
242 }
243 case IIO_EV_DIR_FALLING:
244 switch (type) {
245 case IIO_EV_TYPE_THRESH:
246 return max30210_write_temp(st->regmap, MAX30210_TEMP_ALM_LO_REG, val);
247 default:
248 return -EINVAL;
249 }
250 default:
251 return -EINVAL;
252 }
253 }
254
255 static int max30210_read_event_config(struct iio_dev *indio_dev,
256 const struct iio_chan_spec *chan,
257 enum iio_event_type type,
258 enum iio_event_direction dir)
259 {
260 struct max30210_state *st = iio_priv(indio_dev);
261 unsigned int val;
262 int ret;
263
264 ret = regmap_read(st->regmap, MAX30210_INT_EN_REG, &val);
265 if (ret)
266 return ret;
267
268 switch (dir) {
269 case IIO_EV_DIR_RISING:
270 switch (type) {
271 case IIO_EV_TYPE_THRESH:
> 272 return FIELD_GET(MAX30210_STATUS_TEMP_HI_MASK, val);
273 default:
274 return -EINVAL;
275 }
276 case IIO_EV_DIR_FALLING:
277 switch (type) {
278 case IIO_EV_TYPE_THRESH:
279 return FIELD_GET(MAX30210_STATUS_TEMP_LO_MASK, val);
280 default:
281 return -EINVAL;
282 }
283 default:
284 return -EINVAL;
285 }
286 }
287
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-05 0:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 12:25 [PATCH v2 0/2] Add " John Erasmus Mari Geronimo
2026-03-04 12:25 ` [PATCH v2 1/2] dt-bindings: iio: temperature: add ADI MAX30210 John Erasmus Mari Geronimo
2026-03-05 0:11 ` David Lechner
2026-03-07 12:21 ` Jonathan Cameron
2026-03-05 7:00 ` Krzysztof Kozlowski
2026-03-04 12:25 ` [PATCH v2 2/2] iio: temperature: add support for Analog Devices MAX30210 John Erasmus Mari Geronimo
2026-03-05 0:34 ` kernel test robot [this message]
2026-03-05 0:45 ` kernel test robot
2026-03-05 0:56 ` David Lechner
2026-03-07 12:38 ` Jonathan Cameron
2026-03-04 13:42 ` [PATCH v2 0/2] Add " Andy Shevchenko
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=202603050819.rN8MJLQm-lkp@intel.com \
--to=lkp@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=johnerasmusmari.geronimo@analog.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nuno.sa@analog.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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
Powered by JetHome