summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/math.h
Commit message (Collapse)AuthorAgeFilesLines
* btrfs: replace GPL boilerplate by SPDX -- headersDavid Sterba2018-04-121-17/+3
| | | | | | | | | | Remove GPL boilerplate text (long, short, one-line) and keep the rest, ie. personal, company or original source copyright statements. Add the SPDX header. Unify the include protection macros to match the file names. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs: cleanup 64bit/32bit divs, compile time constantsDavid Sterba2015-03-031-4/+2
| | | | | | | | | | | 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>
* Btrfs: cleanup duplicated division functionsMiao Xie2012-12-111-0/+44
div_factor{_fine} has been implemented for two times, cleanup it. And I move them into a independent file named math.h because they are common math functions. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>