From: kernel test robot <lkp@intel.com>
To: Eason Yang <j2anfernee@gmail.com>,
avifishman70@gmail.com, tmaimon77@gmail.com,
tali.perry1@gmail.com, venture@google.com, yuenn@google.com,
benjaminfair@google.com, jic23@kernel.org, lars@metafoo.de,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
nuno.sa@analog.com, dlechner@baylibre.com,
javier.carrasco.cruz@gmail.com,
andriy.shevchenko@linux.intel.com, gstols@baylibre.com,
olivier.moysan@foss.st.com, mitrutzceclan@gmail.com,
tgamblin@baylibre.com, matteomartelli3@gmail.com,
marcelo.schmitt@analog.com, alisadariana@gmail.com,
joao.goncalves@toradex.com, thomas.bonnefille@bootlin.com,
ramona.nechita@analog.com, herve.codina@bootlin.com,
chanh@os.amperecomputing.com, KWLIU@nuvoton.com,
yhyang2@nuvoton.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
openbmc@lists.ozlabs.org
Subject: Re: [PATCH v4 2/2] iio: adc: add support for Nuvoton NCT7201
Date: Tue, 4 Mar 2025 01:41:01 +0800 [thread overview]
Message-ID: <202503040154.I5tA9gE9-lkp@intel.com> (raw)
In-Reply-To: <20250221090918.1487689-3-j2anfernee@gmail.com>
Hi Eason,
kernel test robot noticed the following build errors:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linus/master v6.14-rc5 next-20250303]
[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/Eason-Yang/dt-bindings-iio-adc-add-NCT7201-ADCs/20250221-171244
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20250221090918.1487689-3-j2anfernee%40gmail.com
patch subject: [PATCH v4 2/2] iio: adc: add support for Nuvoton NCT7201
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20250304/202503040154.I5tA9gE9-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250304/202503040154.I5tA9gE9-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/202503040154.I5tA9gE9-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/iio/adc/nct7201.c:212:10: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
212 | *val = FIELD_GET(NCT7201_REG_VIN_MASK, volt);
| ^
drivers/iio/adc/nct7201.c:256:9: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
256 | *val = FIELD_GET(NCT7201_REG_VIN_MASK, volt);
| ^
>> drivers/iio/adc/nct7201.c:278:9: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
278 | FIELD_PREP(NCT7201_REG_VIN_MASK, val));
| ^
3 errors generated.
vim +/FIELD_GET +212 drivers/iio/adc/nct7201.c
192
193 static int nct7201_read_raw(struct iio_dev *indio_dev,
194 struct iio_chan_spec const *chan,
195 int *val, int *val2, long mask)
196 {
197 u16 volt;
198 unsigned int value;
199 int err;
200 struct nct7201_chip_info *chip = iio_priv(indio_dev);
201
202 if (chan->type != IIO_VOLTAGE)
203 return -EOPNOTSUPP;
204
205 guard(mutex)(&chip->access_lock);
206 switch (mask) {
207 case IIO_CHAN_INFO_RAW:
208 err = regmap_read(chip->regmap16, NCT7201_REG_VIN(chan->address), &value);
209 if (err < 0)
210 return err;
211 volt = value;
> 212 *val = FIELD_GET(NCT7201_REG_VIN_MASK, volt);
213 return IIO_VAL_INT;
214 case IIO_CHAN_INFO_SCALE:
215 /* From the datasheet, we have to multiply by 0.0004995 */
216 *val = 0;
217 *val2 = 499500;
218 return IIO_VAL_INT_PLUS_NANO;
219 default:
220 return -EINVAL;
221 }
222 }
223
224 static int nct7201_read_event_value(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,
229 int *val, int *val2)
230 {
231 struct nct7201_chip_info *chip = iio_priv(indio_dev);
232 u16 volt;
233 unsigned int value;
234 int err;
235
236 if (chan->type != IIO_VOLTAGE)
237 return -EOPNOTSUPP;
238
239 if (info != IIO_EV_INFO_VALUE)
240 return -EINVAL;
241
242 if (dir == IIO_EV_DIR_FALLING) {
243 err = regmap_read(chip->regmap16, NCT7201_REG_VIN_LOW_LIMIT(chan->address),
244 &value);
245 if (err < 0)
246 return err;
247 volt = value;
248 } else {
249 err = regmap_read(chip->regmap16, NCT7201_REG_VIN_HIGH_LIMIT(chan->address),
250 &value);
251 if (err < 0)
252 return err;
253 volt = value;
254 }
255
256 *val = FIELD_GET(NCT7201_REG_VIN_MASK, volt);
257
258 return IIO_VAL_INT;
259 }
260
261 static int nct7201_write_event_value(struct iio_dev *indio_dev,
262 const struct iio_chan_spec *chan,
263 enum iio_event_type type,
264 enum iio_event_direction dir,
265 enum iio_event_info info,
266 int val, int val2)
267 {
268 struct nct7201_chip_info *chip = iio_priv(indio_dev);
269
270 if (chan->type != IIO_VOLTAGE)
271 return -EOPNOTSUPP;
272
273 if (info != IIO_EV_INFO_VALUE)
274 return -EOPNOTSUPP;
275
276 if (dir == IIO_EV_DIR_FALLING)
277 regmap_write(chip->regmap16, NCT7201_REG_VIN_LOW_LIMIT(chan->address),
> 278 FIELD_PREP(NCT7201_REG_VIN_MASK, val));
279 else
280 regmap_write(chip->regmap16, NCT7201_REG_VIN_HIGH_LIMIT(chan->address),
281 FIELD_PREP(NCT7201_REG_VIN_MASK, val));
282
283 return 0;
284 }
285
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Eason Yang <j2anfernee@gmail.com>,
avifishman70@gmail.com, tmaimon77@gmail.com,
tali.perry1@gmail.com, venture@google.com, yuenn@google.com,
benjaminfair@google.com, jic23@kernel.org, lars@metafoo.de,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
nuno.sa@analog.com, dlechner@baylibre.com,
javier.carrasco.cruz@gmail.com,
andriy.shevchenko@linux.intel.com, gstols@baylibre.com,
olivier.moysan@foss.st.com, mitrutzceclan@gmail.com,
tgamblin@baylibre.com, matteomartelli3@gmail.com,
marcelo.schmitt@analog.com, alisadariana@gmail.com,
joao.goncalves@toradex.com, thomas.bonnefille@bootlin.com,
ramona.nechita@analog.com, herve.codina@bootlin.com,
chanh@os.amperecomputing.com, KWLIU@nuvoton.com,
yhyang2@nuvoton.com
Cc: openbmc@lists.ozlabs.org, llvm@lists.linux.dev,
oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v4 2/2] iio: adc: add support for Nuvoton NCT7201
Date: Tue, 4 Mar 2025 01:41:01 +0800 [thread overview]
Message-ID: <202503040154.I5tA9gE9-lkp@intel.com> (raw)
In-Reply-To: <20250221090918.1487689-3-j2anfernee@gmail.com>
Hi Eason,
kernel test robot noticed the following build errors:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linus/master v6.14-rc5 next-20250303]
[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/Eason-Yang/dt-bindings-iio-adc-add-NCT7201-ADCs/20250221-171244
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20250221090918.1487689-3-j2anfernee%40gmail.com
patch subject: [PATCH v4 2/2] iio: adc: add support for Nuvoton NCT7201
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20250304/202503040154.I5tA9gE9-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250304/202503040154.I5tA9gE9-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/202503040154.I5tA9gE9-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/iio/adc/nct7201.c:212:10: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
212 | *val = FIELD_GET(NCT7201_REG_VIN_MASK, volt);
| ^
drivers/iio/adc/nct7201.c:256:9: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
256 | *val = FIELD_GET(NCT7201_REG_VIN_MASK, volt);
| ^
>> drivers/iio/adc/nct7201.c:278:9: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
278 | FIELD_PREP(NCT7201_REG_VIN_MASK, val));
| ^
3 errors generated.
vim +/FIELD_GET +212 drivers/iio/adc/nct7201.c
192
193 static int nct7201_read_raw(struct iio_dev *indio_dev,
194 struct iio_chan_spec const *chan,
195 int *val, int *val2, long mask)
196 {
197 u16 volt;
198 unsigned int value;
199 int err;
200 struct nct7201_chip_info *chip = iio_priv(indio_dev);
201
202 if (chan->type != IIO_VOLTAGE)
203 return -EOPNOTSUPP;
204
205 guard(mutex)(&chip->access_lock);
206 switch (mask) {
207 case IIO_CHAN_INFO_RAW:
208 err = regmap_read(chip->regmap16, NCT7201_REG_VIN(chan->address), &value);
209 if (err < 0)
210 return err;
211 volt = value;
> 212 *val = FIELD_GET(NCT7201_REG_VIN_MASK, volt);
213 return IIO_VAL_INT;
214 case IIO_CHAN_INFO_SCALE:
215 /* From the datasheet, we have to multiply by 0.0004995 */
216 *val = 0;
217 *val2 = 499500;
218 return IIO_VAL_INT_PLUS_NANO;
219 default:
220 return -EINVAL;
221 }
222 }
223
224 static int nct7201_read_event_value(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,
229 int *val, int *val2)
230 {
231 struct nct7201_chip_info *chip = iio_priv(indio_dev);
232 u16 volt;
233 unsigned int value;
234 int err;
235
236 if (chan->type != IIO_VOLTAGE)
237 return -EOPNOTSUPP;
238
239 if (info != IIO_EV_INFO_VALUE)
240 return -EINVAL;
241
242 if (dir == IIO_EV_DIR_FALLING) {
243 err = regmap_read(chip->regmap16, NCT7201_REG_VIN_LOW_LIMIT(chan->address),
244 &value);
245 if (err < 0)
246 return err;
247 volt = value;
248 } else {
249 err = regmap_read(chip->regmap16, NCT7201_REG_VIN_HIGH_LIMIT(chan->address),
250 &value);
251 if (err < 0)
252 return err;
253 volt = value;
254 }
255
256 *val = FIELD_GET(NCT7201_REG_VIN_MASK, volt);
257
258 return IIO_VAL_INT;
259 }
260
261 static int nct7201_write_event_value(struct iio_dev *indio_dev,
262 const struct iio_chan_spec *chan,
263 enum iio_event_type type,
264 enum iio_event_direction dir,
265 enum iio_event_info info,
266 int val, int val2)
267 {
268 struct nct7201_chip_info *chip = iio_priv(indio_dev);
269
270 if (chan->type != IIO_VOLTAGE)
271 return -EOPNOTSUPP;
272
273 if (info != IIO_EV_INFO_VALUE)
274 return -EOPNOTSUPP;
275
276 if (dir == IIO_EV_DIR_FALLING)
277 regmap_write(chip->regmap16, NCT7201_REG_VIN_LOW_LIMIT(chan->address),
> 278 FIELD_PREP(NCT7201_REG_VIN_MASK, val));
279 else
280 regmap_write(chip->regmap16, NCT7201_REG_VIN_HIGH_LIMIT(chan->address),
281 FIELD_PREP(NCT7201_REG_VIN_MASK, val));
282
283 return 0;
284 }
285
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-03-03 17:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 9:09 [PATCH v4 0/2] iio: adc: add Nuvoton NCT7201 ADC driver Eason Yang
2025-02-21 9:09 ` Eason Yang
2025-02-21 9:09 ` [PATCH v4 1/2] dt-bindings: iio: adc: add NCT7201 ADCs Eason Yang
2025-02-21 9:09 ` Eason Yang
2025-02-21 15:56 ` David Lechner
2025-02-21 15:56 ` David Lechner
2025-04-07 13:41 ` Yu-Hsian Yang
2025-04-07 13:41 ` Yu-Hsian Yang
2025-02-21 16:56 ` Conor Dooley
2025-02-21 16:56 ` Conor Dooley
2025-02-21 9:09 ` [PATCH v4 2/2] iio: adc: add support for Nuvoton NCT7201 Eason Yang
2025-02-21 9:09 ` Eason Yang
2025-02-21 16:30 ` David Lechner
2025-02-21 16:30 ` David Lechner
2025-02-22 12:48 ` kernel test robot
2025-02-22 12:48 ` kernel test robot
2025-02-22 15:56 ` Jonathan Cameron
2025-02-22 15:56 ` Jonathan Cameron
2025-02-25 21:11 ` Paul Menzel
2025-02-25 21:11 ` Paul Menzel
2025-03-03 17:41 ` kernel test robot [this message]
2025-03-03 17:41 ` kernel test robot
2025-02-22 15:25 ` [PATCH v4 0/2] iio: adc: add Nuvoton NCT7201 ADC driver Jonathan Cameron
2025-02-22 15:25 ` Jonathan Cameron
2025-04-07 13:51 ` Yu-Hsian Yang
2025-04-07 13:51 ` Yu-Hsian Yang
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=202503040154.I5tA9gE9-lkp@intel.com \
--to=lkp@intel.com \
--cc=KWLIU@nuvoton.com \
--cc=alisadariana@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=avifishman70@gmail.com \
--cc=benjaminfair@google.com \
--cc=chanh@os.amperecomputing.com \
--cc=conor+dt@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gstols@baylibre.com \
--cc=herve.codina@bootlin.com \
--cc=j2anfernee@gmail.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=jic23@kernel.org \
--cc=joao.goncalves@toradex.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=llvm@lists.linux.dev \
--cc=marcelo.schmitt@analog.com \
--cc=matteomartelli3@gmail.com \
--cc=mitrutzceclan@gmail.com \
--cc=nuno.sa@analog.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=olivier.moysan@foss.st.com \
--cc=openbmc@lists.ozlabs.org \
--cc=ramona.nechita@analog.com \
--cc=robh@kernel.org \
--cc=tali.perry1@gmail.com \
--cc=tgamblin@baylibre.com \
--cc=thomas.bonnefille@bootlin.com \
--cc=tmaimon77@gmail.com \
--cc=venture@google.com \
--cc=yhyang2@nuvoton.com \
--cc=yuenn@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.