}
/*
- * Find the next non-null entry at the same level in the tree. The next value
- * will be mas->node[mas_offset(mas)] or MAS_NONE.
+ * mas_next_node() - Get the next node at the same level in the tree.
+ * @mas: The maple state
+ * @max: The maximum pivot value to check.
*
+ * Returns: The next value will be mas->node[mas_offset(mas)] or MAS_NONE.
*
- * Node: Not safe to call with mas->node == root
+ * Finds the next non-null entry at the same level in the tree. Slot is passed
+ * in the maple state offset, eg: mas_set_offset(mas, offset)
*/
static inline unsigned long mas_next_node(struct ma_state *mas,
if (prev_piv > max)
goto no_entry;
- if (offset!= 0 && pivot == 0)
+ if (!pivot && offset)
break;
mn = rcu_dereference(slots[offset]);