]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dmaengine: dmatest: Explicitly cast divisor to u32
authorThorsten Blum <thorsten.blum@toblux.com>
Thu, 11 Jul 2024 13:20:01 +0000 (15:20 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 5 Aug 2024 17:00:55 +0000 (22:30 +0530)
commitda080d987e20a8b20b368c75826226834c9660a3
treeeabdd2c05437888e59c1007026a0461b5e20ebe1
parent8bce5522a13107605709c3b253c09cb1f90850e8
dmaengine: dmatest: Explicitly cast divisor to u32

As the comment explains, the while loop ensures that runtime fits into
32 bits. Since do_div() casts the divisor to u32 anyway, explicitly cast
runtime to u32 to remove the following Coccinelle/coccicheck warning
reported by do_div.cocci:

  WARNING: do_div() does a 64-by-32 division, please consider using div64_s64 instead

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Link: https://lore.kernel.org/r/20240711132001.92157-1-thorsten.blum@toblux.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dmatest.c