]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
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>
Fri, 20 Feb 2015 17:22:16 +0000 (18:22 +0100)
commit16068ec19f497bd80552332b4523150884888a7a
tree855f1cedc1bce22fcda014abfc016422192409bc
parente57cf21e9787c081db4db6afa02e6e70112ee410
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