mm: page_alloc: use div64_ul() instead of do_div()
authorThorsten Blum <thorsten.blum@toblux.com>
Wed, 28 Feb 2024 22:49:12 +0000 (23:49 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 6 Mar 2024 21:04:18 +0000 (13:04 -0800)
commit72741db6836b4fc3c810e33a53f7cb9cf2cd48a7
treedcf9d8f372934e78311422314d3ff7959d01a5ff
parentf1cce6f7fa302e2ea996de33eeeeb3a70d93a3e7
mm: page_alloc: use div64_ul() instead of do_div()

Fixes Coccinelle/coccicheck warning reported by do_div.cocci.

Compared to do_div(), div64_ul() does not implicitly cast the divisor and
does not unnecessarily calculate the remainder.

Link: https://lkml.kernel.org/r/20240228224911.1164-2-thorsten.blum@toblux.com
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c