[PATCH v2 2/2] iio: buffer-dmaengine: drop dead max_size computation
Nuno Sá <[email protected]>
| Newsgroups | org.kernel.vger.linux-iio |
|---|---|
| Message-ID | <20260828-iio-buffer-dmabuf-iommu-fic-v2-2-b4dd71827621@analog.com> |
iio_dmaengine_buffer_submit_block() computes max_size unconditionally at the top of the function, but only the fileio branch consumes it - and that branch already computes it again right where it is used. Drop the unconditional copy. No functional change intended. Signed-off-by: Nuno Sá <[email protected]> --- drivers/iio/buffer/industrialio-buffer-dmaengine.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c b/drivers/iio/buffer/industrialio-buffer-dmaengine.c index 376486be3f55..284d4ef92104 100644 --- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c +++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c @@ -88,9 +88,6 @@ static int iio_dmaengine_buffer_submit_block(struct iio_dma_buffer_queue *queue, unsigned int i; int nents; - max_size = min(block->size, dmaengine_buffer->max_size); - max_size = round_down(max_size, dmaengine_buffer->align); - if (queue->buffer.direction == IIO_BUFFER_DIRECTION_IN) dma_dir = DMA_DEV_TO_MEM; else -- 2.55.0