Re: [PATCH v3 3/4] lib/xarray: introduce a new helper xas_get_order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 16, 2024 at 01:18:55AM +0800, Kairui Song wrote:
>  /**
> - * xa_get_order() - Get the order of an entry.
> - * @xa: XArray.
> - * @index: Index of the entry.
> + * xas_get_order() - Get the order of an loaded entry after xas_load.

I'd just leave that as "Get the order of an entry." as it doesn't have
to be after calling xas_load(), it could be from any other operation
that moves xas.  Also this is the short description!

>  		if (slot >= XA_CHUNK_SIZE)
>  			break;
> -		if (!xa_is_sibling(xas.xa_node->slots[slot]))
> +		if (!xa_is_sibling(xas->xa_node->slots[slot]))

Could you fold in this change I have locally?

-               if (!xa_is_sibling(xas->xa_node->slots[slot]))
+               if (!xa_is_sibling(xa_entry(xas.xa, xas.xa_node, slot)))

That fixes a sparse warning which existed before your modifications.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux