summaryrefslogtreecommitdiff
path: root/drivers/iio/buffer
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2021-11-15 14:19:13 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-11-27 15:12:44 +0000
commitab1fb45579d876aee70eb736d3d9e6a9bacc798d (patch)
tree990e3d471c18b8cb8ed0005f6f0e389210ffb346 /drivers/iio/buffer
parented14e769f64311769dcf20dde544b82c158d01b1 (diff)
iio: buffer-dma: Use round_down() instead of rounddown()
We know that the buffer's alignment will always be a power of two; therefore, we can use the faster round_down() macro. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Alexandru Ardelean <ardeleanalex@gmail.com> Link: https://lore.kernel.org/r/20211115141925.60164-4-paul@crapouillou.net Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/buffer')
-rw-r--r--drivers/iio/buffer/industrialio-buffer-dmaengine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c
index 1ac94c4e9792..f8ce26a24c57 100644
--- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c
+++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c
@@ -67,7 +67,7 @@ static int iio_dmaengine_buffer_submit_block(struct iio_dma_buffer_queue *queue,
dma_cookie_t cookie;
block->bytes_used = min(block->size, dmaengine_buffer->max_size);
- block->bytes_used = rounddown(block->bytes_used,
+ block->bytes_used = round_down(block->bytes_used,
dmaengine_buffer->align);
desc = dmaengine_prep_slave_single(dmaengine_buffer->chan,