[no subject]

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

 



But it looks current code already use xa_is_internal() to check the value we
want to insert in the tree.

For example:

  * xa_is_advanced()
  * mt_is_reserved()

xa_is_advanced() is used in mtree_insert_range() to prevent inserting an
advanced value for a normal API.
mt_is_reserved() is used in mtree_alloc_range() to prevent inserting reserved
value.

Both check apply to an entry which will be inserted, instead of an entry in
current tree. And they are clearly to inform me the value we want to insert
has special meaning for maple tree and need to be handled carefully.

>This is not friendlier for the audience, it's confusing.
>

The confusing point comes from audience would think the "entry" is already an
internal entry in the tree?

If you really think audience would be misled, I would suggest introduce a new
helper, e.g. mt_is_internal(), just like xa_is_advanced()/mt_is_reserved().

To be honest, an open coded check doesn't looks a good practice.

-- 
Wei Yang
Help you, Help me




[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