[PATCH] radix-tree: Use DIV_ROUND_UP instead of reimplementing its function
From: zhong jiang
Date: Mon Sep 10 2018 - 03:47:24 EST
DIV_ROUND_UP has implemented the code-opened function. Therefore, just
replace the implementation with DIV_ROUND_UP.
Signed-off-by: zhong jiang <zhongjiang@xxxxxxxxxx>
---
include/linux/radix-tree.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 34149e8..2e507c6 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -75,7 +75,7 @@ static inline bool radix_tree_is_internal_node(void *ptr)
#define RADIX_TREE_MAP_MASK (RADIX_TREE_MAP_SIZE-1)
#define RADIX_TREE_TAG_LONGS \
- ((RADIX_TREE_MAP_SIZE + BITS_PER_LONG - 1) / BITS_PER_LONG)
+ DIV_ROUND_UP(RADIX_TREE_MAP_SIZE, BITS_PER_LONG)
#define RADIX_TREE_INDEX_BITS (8 /* CHAR_BIT */ * sizeof(unsigned long))
#define RADIX_TREE_MAX_PATH (DIV_ROUND_UP(RADIX_TREE_INDEX_BITS, \
--
1.7.12.4