From 784352fe0bb4814bd969fb390c3d03486a5aaafa Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 21 Aug 2019 18:54:28 +0200 Subject: btrfs: move math functions to misc.h Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba --- fs/btrfs/math.h | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 fs/btrfs/math.h (limited to 'fs/btrfs/math.h') 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 - */ - -#ifndef BTRFS_MATH_H -#define BTRFS_MATH_H - -#include - -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 -- cgit v1.2.3