* [nsa:b4/dev-iio-ad9467-new-devs 4/9] drivers/iio/dac/ad9739a.c:416:44: error: passing argument 1 of 'iio_backend_extend_chan_spec' from incompatible pointer type
@ 2024-06-27 2:55 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-06-27 2:55 UTC (permalink / raw)
To: Nuno Sa; +Cc: oe-kbuild-all, Nuno Sa
tree: https://github.com/nunojsa/linux b4/dev-iio-ad9467-new-devs
head: 07a190d5bdd96dcb948ba00339145f0bb2b461e9
commit: 93939e195eb7ec55a0bdefa022c33008ccf95e3c [4/9] iio: backend: remove unused parameter
config: i386-buildonly-randconfig-002-20240627 (https://download.01.org/0day-ci/archive/20240627/202406271028.bc4bWSWL-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240627/202406271028.bc4bWSWL-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/202406271028.bc4bWSWL-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/iio/dac/ad9739a.c: In function 'ad9739a_probe':
>> drivers/iio/dac/ad9739a.c:416:44: error: passing argument 1 of 'iio_backend_extend_chan_spec' from incompatible pointer type [-Werror=incompatible-pointer-types]
416 | ret = iio_backend_extend_chan_spec(indio_dev, st->back,
| ^~~~~~~~~
| |
| struct iio_dev *
In file included from drivers/iio/dac/ad9739a.c:23:
include/linux/iio/backend.h:145:54: note: expected 'struct iio_backend *' but argument is of type 'struct iio_dev *'
145 | int iio_backend_extend_chan_spec(struct iio_backend *back,
| ~~~~~~~~~~~~~~~~~~~~^~~~
drivers/iio/dac/ad9739a.c:416:57: error: passing argument 2 of 'iio_backend_extend_chan_spec' from incompatible pointer type [-Werror=incompatible-pointer-types]
416 | ret = iio_backend_extend_chan_spec(indio_dev, st->back,
| ~~^~~~~~
| |
| struct iio_backend *
include/linux/iio/backend.h:146:56: note: expected 'struct iio_chan_spec *' but argument is of type 'struct iio_backend *'
146 | struct iio_chan_spec *chan);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
>> drivers/iio/dac/ad9739a.c:416:15: error: too many arguments to function 'iio_backend_extend_chan_spec'
416 | ret = iio_backend_extend_chan_spec(indio_dev, st->back,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/iio/backend.h:145:5: note: declared here
145 | int iio_backend_extend_chan_spec(struct iio_backend *back,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for REGMAP_SPI
Depends on [n]: SPI [=n]
Selected by [y]:
- AD9739A [=y] && IIO [=y] && (SPI [=n] || COMPILE_TEST [=y])
vim +/iio_backend_extend_chan_spec +416 drivers/iio/dac/ad9739a.c
e77603d5468b90 Nuno Sa 2024-04-19 361
e77603d5468b90 Nuno Sa 2024-04-19 362 static int ad9739a_probe(struct spi_device *spi)
e77603d5468b90 Nuno Sa 2024-04-19 363 {
e77603d5468b90 Nuno Sa 2024-04-19 364 struct device *dev = &spi->dev;
e77603d5468b90 Nuno Sa 2024-04-19 365 struct iio_dev *indio_dev;
e77603d5468b90 Nuno Sa 2024-04-19 366 struct ad9739a_state *st;
e77603d5468b90 Nuno Sa 2024-04-19 367 unsigned int id;
e77603d5468b90 Nuno Sa 2024-04-19 368 struct clk *clk;
e77603d5468b90 Nuno Sa 2024-04-19 369 int ret;
e77603d5468b90 Nuno Sa 2024-04-19 370
e77603d5468b90 Nuno Sa 2024-04-19 371 indio_dev = devm_iio_device_alloc(dev, sizeof(*st));
e77603d5468b90 Nuno Sa 2024-04-19 372 if (!indio_dev)
e77603d5468b90 Nuno Sa 2024-04-19 373 return -ENOMEM;
e77603d5468b90 Nuno Sa 2024-04-19 374
e77603d5468b90 Nuno Sa 2024-04-19 375 st = iio_priv(indio_dev);
e77603d5468b90 Nuno Sa 2024-04-19 376
e77603d5468b90 Nuno Sa 2024-04-19 377 clk = devm_clk_get_enabled(dev, NULL);
e77603d5468b90 Nuno Sa 2024-04-19 378 if (IS_ERR(clk))
e77603d5468b90 Nuno Sa 2024-04-19 379 return dev_err_probe(dev, PTR_ERR(clk), "Could not get clkin\n");
e77603d5468b90 Nuno Sa 2024-04-19 380
e77603d5468b90 Nuno Sa 2024-04-19 381 st->sample_rate = clk_get_rate(clk);
e77603d5468b90 Nuno Sa 2024-04-19 382 if (!in_range(st->sample_rate, AD9739A_MIN_DAC_CLK,
e77603d5468b90 Nuno Sa 2024-04-19 383 AD9739A_DAC_CLK_RANGE))
e77603d5468b90 Nuno Sa 2024-04-19 384 return dev_err_probe(dev, -EINVAL,
e77603d5468b90 Nuno Sa 2024-04-19 385 "Invalid dac clk range(%lu) [%lu %lu]\n",
e77603d5468b90 Nuno Sa 2024-04-19 386 st->sample_rate, AD9739A_MIN_DAC_CLK,
e77603d5468b90 Nuno Sa 2024-04-19 387 AD9739A_MAX_DAC_CLK);
e77603d5468b90 Nuno Sa 2024-04-19 388
e77603d5468b90 Nuno Sa 2024-04-19 389 st->regmap = devm_regmap_init_spi(spi, &ad9739a_regmap_config);
e77603d5468b90 Nuno Sa 2024-04-19 390 if (IS_ERR(st->regmap))
e77603d5468b90 Nuno Sa 2024-04-19 391 return PTR_ERR(st->regmap);
e77603d5468b90 Nuno Sa 2024-04-19 392
e77603d5468b90 Nuno Sa 2024-04-19 393 ret = regmap_read(st->regmap, AD9739A_REG_ID, &id);
e77603d5468b90 Nuno Sa 2024-04-19 394 if (ret)
e77603d5468b90 Nuno Sa 2024-04-19 395 return ret;
e77603d5468b90 Nuno Sa 2024-04-19 396
e77603d5468b90 Nuno Sa 2024-04-19 397 if (id != AD9739A_ID)
e77603d5468b90 Nuno Sa 2024-04-19 398 dev_warn(dev, "Unrecognized CHIP_ID 0x%X", id);
e77603d5468b90 Nuno Sa 2024-04-19 399
e77603d5468b90 Nuno Sa 2024-04-19 400 ret = ad9739a_reset(dev, st);
e77603d5468b90 Nuno Sa 2024-04-19 401 if (ret)
e77603d5468b90 Nuno Sa 2024-04-19 402 return ret;
e77603d5468b90 Nuno Sa 2024-04-19 403
e77603d5468b90 Nuno Sa 2024-04-19 404 ret = ad9739a_init(dev, st);
e77603d5468b90 Nuno Sa 2024-04-19 405 if (ret)
e77603d5468b90 Nuno Sa 2024-04-19 406 return ret;
e77603d5468b90 Nuno Sa 2024-04-19 407
e77603d5468b90 Nuno Sa 2024-04-19 408 st->back = devm_iio_backend_get(dev, NULL);
e77603d5468b90 Nuno Sa 2024-04-19 409 if (IS_ERR(st->back))
e77603d5468b90 Nuno Sa 2024-04-19 410 return PTR_ERR(st->back);
e77603d5468b90 Nuno Sa 2024-04-19 411
e77603d5468b90 Nuno Sa 2024-04-19 412 ret = devm_iio_backend_request_buffer(dev, st->back, indio_dev);
e77603d5468b90 Nuno Sa 2024-04-19 413 if (ret)
e77603d5468b90 Nuno Sa 2024-04-19 414 return ret;
e77603d5468b90 Nuno Sa 2024-04-19 415
e77603d5468b90 Nuno Sa 2024-04-19 @416 ret = iio_backend_extend_chan_spec(indio_dev, st->back,
e77603d5468b90 Nuno Sa 2024-04-19 417 &ad9739a_channels[0]);
e77603d5468b90 Nuno Sa 2024-04-19 418 if (ret)
e77603d5468b90 Nuno Sa 2024-04-19 419 return ret;
e77603d5468b90 Nuno Sa 2024-04-19 420
e77603d5468b90 Nuno Sa 2024-04-19 421 ret = iio_backend_set_sampling_freq(st->back, 0, st->sample_rate);
e77603d5468b90 Nuno Sa 2024-04-19 422 if (ret)
e77603d5468b90 Nuno Sa 2024-04-19 423 return ret;
e77603d5468b90 Nuno Sa 2024-04-19 424
e77603d5468b90 Nuno Sa 2024-04-19 425 ret = devm_iio_backend_enable(dev, st->back);
e77603d5468b90 Nuno Sa 2024-04-19 426 if (ret)
e77603d5468b90 Nuno Sa 2024-04-19 427 return ret;
e77603d5468b90 Nuno Sa 2024-04-19 428
e77603d5468b90 Nuno Sa 2024-04-19 429 indio_dev->name = "ad9739a";
e77603d5468b90 Nuno Sa 2024-04-19 430 indio_dev->info = &ad9739a_info;
e77603d5468b90 Nuno Sa 2024-04-19 431 indio_dev->channels = ad9739a_channels;
e77603d5468b90 Nuno Sa 2024-04-19 432 indio_dev->num_channels = ARRAY_SIZE(ad9739a_channels);
e77603d5468b90 Nuno Sa 2024-04-19 433 indio_dev->setup_ops = &ad9739a_buffer_setup_ops;
e77603d5468b90 Nuno Sa 2024-04-19 434
e77603d5468b90 Nuno Sa 2024-04-19 435 return devm_iio_device_register(&spi->dev, indio_dev);
e77603d5468b90 Nuno Sa 2024-04-19 436 }
e77603d5468b90 Nuno Sa 2024-04-19 437
:::::: The code at line 416 was first introduced by commit
:::::: e77603d5468b9093c111a998a86604e21a9e7f48 iio: dac: support the ad9739a RF DAC
:::::: TO: Nuno Sa <nuno.sa@analog.com>
:::::: CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-06-27 2:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-27 2:55 [nsa:b4/dev-iio-ad9467-new-devs 4/9] drivers/iio/dac/ad9739a.c:416:44: error: passing argument 1 of 'iio_backend_extend_chan_spec' from incompatible pointer type kernel test robot
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.