diff options
author | Gargi Sharma <gs051095@gmail.com> | 2017-03-07 21:32:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-09 19:42:51 +0300 |
commit | f4fa03701d8ad94846f3577d46cd8cc782fe9d8a (patch) | |
tree | 905942d48ccc7b715f3b49292edee119bc372dfb /drivers/staging/lustre | |
parent | 91800b05caeb22ab1623e64809937b1816e533ca (diff) | |
download | linux-f4fa03701d8ad94846f3577d46cd8cc782fe9d8a.tar.xz |
staging: lustre: Remove max_u64 function
Removed the max_u64 function to find the maximum value of
two unsigned 64 bit numbers to use the linux macro max
instead.
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r-- | drivers/staging/lustre/lustre/ldlm/interval_tree.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/interval_tree.c b/drivers/staging/lustre/lustre/ldlm/interval_tree.c index e134ecd21bb2..e1069021420d 100644 --- a/drivers/staging/lustre/lustre/ldlm/interval_tree.c +++ b/drivers/staging/lustre/lustre/ldlm/interval_tree.c @@ -101,11 +101,6 @@ static inline int node_equal(struct interval_node *n1, struct interval_node *n2) return extent_equal(&n1->in_extent, &n2->in_extent); } -static inline __u64 max_u64(__u64 x, __u64 y) -{ - return x > y ? x : y; -} - static struct interval_node *interval_first(struct interval_node *node) { if (!node) @@ -134,8 +129,8 @@ static void __rotate_change_maxhigh(struct interval_node *node, rotate->in_max_high = node->in_max_high; left_max = node->in_left ? node->in_left->in_max_high : 0; right_max = node->in_right ? node->in_right->in_max_high : 0; - node->in_max_high = max_u64(interval_high(node), - max_u64(left_max, right_max)); + node->in_max_high = max(interval_high(node), + max(left_max, right_max)); } /* The left rotation "pivots" around the link from node to node->right, and @@ -394,8 +389,8 @@ static void update_maxhigh(struct interval_node *node, while (node) { left_max = node->in_left ? node->in_left->in_max_high : 0; right_max = node->in_right ? node->in_right->in_max_high : 0; - node->in_max_high = max_u64(interval_high(node), - max_u64(left_max, right_max)); + node->in_max_high = max(interval_high(node), + max(left_max, right_max)); if (node->in_max_high >= old_maxhigh) break; |