dmaengine: stm32-dma: fix stm32_dma_get_max_width
authorAmelie Delaunay <amelie.delaunay@foss.st.com>
Mon, 11 Oct 2021 09:42:58 +0000 (11:42 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 18 Oct 2021 06:42:50 +0000 (12:12 +0530)
commitb20fd5fa310cbf7ec367f263a34382a24c4cee73
tree4271b6b90a168932cb4cc0b56f1f4e73b6fafadb
parent79e40b06a4ebfc8e0a48ed6164345f8e0a96b699
dmaengine: stm32-dma: fix stm32_dma_get_max_width

buf_addr parameter of stm32_dma_set_xfer_param function is a dma_addr_t.
We only need to check the remainder of buf_addr/max_width, so, no need to
use do_div and extra u64 addr. Use '%' instead.

Fixes: e0ebdbdcb42a ("dmaengine: stm32-dma: take address into account when computing max width")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20211011094259.315023-3-amelie.delaunay@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32-dma.c