diff --git a/include/import/eb32tree.h b/include/import/eb32tree.h index be45e19aa..6b52945c5 100644 --- a/include/import/eb32tree.h +++ b/include/import/eb32tree.h @@ -161,7 +161,7 @@ static forceinline struct eb32_node *__eb32_lookup(struct eb_root *root, u32 x) return node; } - if ((y >> node_bit) >= EB_NODE_BRANCHES) + if (y & -(z << 1)) return NULL; /* no more common bits */ } } @@ -217,7 +217,7 @@ static forceinline struct eb32_node *__eb32i_lookup(struct eb_root *root, s32 x) return node; } - if ((y >> node_bit) >= EB_NODE_BRANCHES) + if (y & -(z << 1)) return NULL; /* no more common bits */ } } diff --git a/include/import/eb64tree.h b/include/import/eb64tree.h index 75c13c367..baaeb1dfe 100644 --- a/include/import/eb64tree.h +++ b/include/import/eb64tree.h @@ -159,7 +159,7 @@ static forceinline struct eb64_node *__eb64_lookup(struct eb_root *root, u64 x) return node; } - if ((y >> node->node.bit) >= EB_NODE_BRANCHES) + if (y & -(z << 1)) return NULL; /* no more common bits */ } } @@ -213,7 +213,7 @@ static forceinline struct eb64_node *__eb64i_lookup(struct eb_root *root, s64 x) return node; } - if ((y >> node->node.bit) >= EB_NODE_BRANCHES) + if (y & -(z << 1)) return NULL; /* no more common bits */ } }