Re: [PATCH 1/2] Documentation: maple_tree: Point out constraint when using xa_{mk, to}_value

From: Matthew Wilcox

Date: Mon May 04 2026 - 16:32:53 EST


On Mon, May 04, 2026 at 05:57:45PM +0100, Wei-Lin Chang wrote:
> Using xa_{mk, to}_value when storing values loses the information of
> the top bit from the left shift, point that out in the doc.

I don't know if that's necessary ... it's obvious when looking at the
function:

static inline void *xa_mk_value(unsigned long v)
{
WARN_ON((long)v < 0);
return (void *)((v << 1) | 1);
}

and if you ignore it, you'll find out. But if this needs to be
documented anywhere, it's in the kernel-doc for xa_mk_value()
and not in the maple tree docs.