nilfs2: use div64_ul() instead of do_div()
authorThorsten Blum <thorsten.blum@toblux.com>
Wed, 6 Mar 2024 14:25:47 +0000 (23:25 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 12 Mar 2024 20:09:23 +0000 (13:09 -0700)
commitadc2c8d0b36f8c97cd3bf7c1420f8d61ee08ce4d
treeffe2d65633bec23f031e45e3376dc7f83ca35cf8
parent8c86fb68ffcb0d8a5418e171c8d359d712912e9b
nilfs2: use div64_ul() instead of do_div()

Fixes Coccinelle/coccicheck warnings 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/20240229210456.63234-2-thorsten.blum@toblux.com
Link: https://lkml.kernel.org/r/20240306142547.4612-1-konishi.ryusuke@gmail.com
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/nilfs2/cpfile.c
fs/nilfs2/dat.c
fs/nilfs2/ioctl.c
fs/nilfs2/sufile.c
fs/nilfs2/super.c
fs/nilfs2/the_nilfs.c