btrfs: cleanup 64bit/32bit divs, compile time constants
authorDavid Sterba <dsterba@suse.cz>
Fri, 16 Jan 2015 16:21:12 +0000 (17:21 +0100)
committerDavid Sterba <dsterba@suse.cz>
Tue, 3 Mar 2015 16:23:57 +0000 (17:23 +0100)
commitf8c269d7223f6b63cc5936eb191bc3b170d24342
tree2e82cc23da9f436bbb6fde058b3321619f990db2
parent351810c1d2aafa288af61844d877941d516fb031
btrfs: cleanup 64bit/32bit divs, compile time constants

Switch to div_u64 if the divisor is a numeric constant or sum of
sizeof()s. We can remove a few instances of do_div that has the hidden
semtantics of changing the 1st argument.

Small power-of-two divisors are converted to bitshifts, large values are
kept intact for clarity.

Signed-off-by: David Sterba <dsterba@suse.cz>
fs/btrfs/dev-replace.c
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/free-space-cache.c
fs/btrfs/math.h
fs/btrfs/super.c