return mas_alloc_req(mas);
}
-static inline void mas_set_offset(struct ma_state *mas, int slot)
+/*
+ * mas_set_offset() - set the offset into a give node (slot/pivot number)
+ * @mas: The maple state
+ * @offset: The offset
+ *
+ */
+static inline void mas_set_offset(struct ma_state *mas, int offset)
{
- mas_set_alloc_req(mas, slot);
+ mas_set_alloc_req(mas, offset);
}
-static inline unsigned long ma_get_pivot(const struct maple_node *mn,
+/*
+ * ma_get_pivot() - Get the pivot of a node.
+ * @node - the maple node.
+ * @piv - the pivot to retrieve.
+ * @type - the node type.
+ *
+ * Returns: The value of the @piv in the @node.
+ */
+static inline unsigned long ma_get_pivot(const struct maple_node *node,
unsigned char piv, enum maple_type type)
{
switch (type) {
case maple_arange_64:
- return mn->ma64.pivot[piv];
+ return node->ma64.pivot[piv];
case maple_range_64:
case maple_leaf_64:
- return mn->mr64.pivot[piv];
+ return node->mr64.pivot[piv];
case maple_dense:
default:
return 0;