diff options
author | David Sterba <dsterba@suse.com> | 2019-08-21 18:54:28 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-09-09 14:59:15 +0200 |
commit | 784352fe0bb4814bd969fb390c3d03486a5aaafa (patch) | |
tree | 50ef76b70d0aa12b35a214f1fa2dd1cc92996c0b /fs/btrfs/math.h | |
parent | 602cbe91fb012a923a9fea880e600e004eb1543b (diff) |
btrfs: move math functions to misc.h
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/math.h')
-rw-r--r-- | fs/btrfs/math.h | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/fs/btrfs/math.h b/fs/btrfs/math.h deleted file mode 100644 index 75246f2f56ba..000000000000 --- a/fs/btrfs/math.h +++ /dev/null @@ -1,28 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Copyright (C) 2012 Fujitsu. All rights reserved. - * Written by Miao Xie <miaox@cn.fujitsu.com> - */ - -#ifndef BTRFS_MATH_H -#define BTRFS_MATH_H - -#include <asm/div64.h> - -static inline u64 div_factor(u64 num, int factor) -{ - if (factor == 10) - return num; - num *= factor; - return div_u64(num, 10); -} - -static inline u64 div_factor_fine(u64 num, int factor) -{ - if (factor == 100) - return num; - num *= factor; - return div_u64(num, 100); -} - -#endif |