return (unsigned long)entry & 4;
}
+/* Private
+ * We also reserve values with the bottom two bits set to '10' which are
+ * below 4096
+ */
static inline bool mt_is_reserved(const void *entry)
{
return ((unsigned long)entry < 4096) && xa_is_internal(entry);
return true;
}
-/* Private
- * We also reserve values with the bottom two bits set to '10' which are
- * below 4096
- */
-bool ma_reserved(void *entry)
-{
- unsigned long ul_entry = (unsigned long)entry;
-
- if ((ul_entry < 4096) && ((ul_entry & 3) == 2))
- return true;
-
- return false;
-}
-
void ma_insert(struct ma_state *mas, void *entry)
{
unsigned char slot = MAPLE_NODE_SLOTS;
MA_STATE(ms, mt, first, last);
- if (WARN_ON_ONCE(ma_reserved(entry)))
+ if (WARN_ON_ONCE(mt_is_reserved(entry)))
return -EINVAL;
if (first > last)