* [linux-next:master 1973/11415] drivers/iio/buffer/industrialio-buffer-dmaengine.c:340 iio_dmaengine_buffer_setup_ext() warn: passing positive error code '(-19)' to 'ERR_CAST'
@ 2025-03-17 23:48 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-03-17 23:48 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: David Lechner <dlechner@baylibre.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>
CC: Nuno Sa <nuno.sa@analog.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e94bd4ec45ac156616da285a0bf03056cd7430fc
commit: 4fe7fd17fe66a5e243c1de7ff32c29fac7039b8d [1973/11415] iio: buffer-dmaengine: split requesting DMA channel from allocating buffer
:::::: branch date: 11 hours ago
:::::: commit date: 5 weeks ago
config: m68k-randconfig-r073-20250314 (https://download.01.org/0day-ci/archive/20250318/202503180711.1ulywogS-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 14.2.0
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202503180711.1ulywogS-lkp@intel.com/
smatch warnings:
drivers/iio/buffer/industrialio-buffer-dmaengine.c:340 iio_dmaengine_buffer_setup_ext() warn: passing positive error code '(-19)' to 'ERR_CAST'
vim +340 drivers/iio/buffer/industrialio-buffer-dmaengine.c
0c040d1ddce1d5 Lars-Peter Clausen 2019-12-11 314
a05dc8b4d4aa3b David Lechner 2024-11-15 315 /**
a05dc8b4d4aa3b David Lechner 2024-11-15 316 * iio_dmaengine_buffer_setup_ext() - Setup a DMA buffer for an IIO device
a05dc8b4d4aa3b David Lechner 2024-11-15 317 * @dev: DMA channel consumer device
a05dc8b4d4aa3b David Lechner 2024-11-15 318 * @indio_dev: IIO device to which to attach this buffer.
a05dc8b4d4aa3b David Lechner 2024-11-15 319 * @channel: DMA channel name, typically "rx".
a05dc8b4d4aa3b David Lechner 2024-11-15 320 * @dir: Direction of buffer (in or out)
a05dc8b4d4aa3b David Lechner 2024-11-15 321 *
a05dc8b4d4aa3b David Lechner 2024-11-15 322 * This allocates a new IIO buffer with devm_iio_dmaengine_buffer_alloc()
a05dc8b4d4aa3b David Lechner 2024-11-15 323 * and attaches it to an IIO device with iio_device_attach_buffer().
a05dc8b4d4aa3b David Lechner 2024-11-15 324 * It also appends the INDIO_BUFFER_HARDWARE mode to the supported modes of the
a05dc8b4d4aa3b David Lechner 2024-11-15 325 * IIO device.
a05dc8b4d4aa3b David Lechner 2024-11-15 326 *
4fe7fd17fe66a5 David Lechner 2025-02-07 327 * Once done using the buffer iio_dmaengine_buffer_teardown() should be used to
a05dc8b4d4aa3b David Lechner 2024-11-15 328 * release it.
a05dc8b4d4aa3b David Lechner 2024-11-15 329 */
c1b91566580c24 Paul Cercueil 2024-04-19 330 struct iio_buffer *iio_dmaengine_buffer_setup_ext(struct device *dev,
a094de22e2efc2 Nuno Sa 2024-04-19 331 struct iio_dev *indio_dev,
c1b91566580c24 Paul Cercueil 2024-04-19 332 const char *channel,
c1b91566580c24 Paul Cercueil 2024-04-19 333 enum iio_buffer_direction dir)
e0fcca9fbd99e9 Alexandru Ardelean 2020-03-24 334 {
4fe7fd17fe66a5 David Lechner 2025-02-07 335 struct dma_chan *chan;
2c6a958789f79d Yicong Yang 2021-04-08 336 struct iio_buffer *buffer;
e0fcca9fbd99e9 Alexandru Ardelean 2020-03-24 337
4fe7fd17fe66a5 David Lechner 2025-02-07 338 chan = dma_request_chan(dev, channel);
4fe7fd17fe66a5 David Lechner 2025-02-07 339 if (IS_ERR(chan))
4fe7fd17fe66a5 David Lechner 2025-02-07 @340 return ERR_CAST(chan);
c1b91566580c24 Paul Cercueil 2024-04-19 341
4fe7fd17fe66a5 David Lechner 2025-02-07 342 buffer = __iio_dmaengine_buffer_setup_ext(indio_dev, chan, dir);
4fe7fd17fe66a5 David Lechner 2025-02-07 343 if (IS_ERR(buffer))
4fe7fd17fe66a5 David Lechner 2025-02-07 344 dma_release_channel(chan);
e0fcca9fbd99e9 Alexandru Ardelean 2020-03-24 345
e0fcca9fbd99e9 Alexandru Ardelean 2020-03-24 346 return buffer;
e0fcca9fbd99e9 Alexandru Ardelean 2020-03-24 347 }
cdd30ebb1b9f36 Peter Zijlstra 2024-12-02 348 EXPORT_SYMBOL_NS_GPL(iio_dmaengine_buffer_setup_ext, "IIO_DMAENGINE_BUFFER");
a094de22e2efc2 Nuno Sa 2024-04-19 349
--
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:[~2025-03-17 23:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-17 23:48 [linux-next:master 1973/11415] drivers/iio/buffer/industrialio-buffer-dmaengine.c:340 iio_dmaengine_buffer_setup_ext() warn: passing positive error code '(-19)' to 'ERR_CAST' 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.