radix-tree: fix some errors in comment
cover radix-tree: fix some errors in comment
Update the comment.
Qiujun Huang (2):
radix-tree: fix kernel-doc for radix_tree_find_next_bit
radix-tree: fix a typo
lib/radix-tree.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/2 radix-tree: fix kernel-doc for radix_tree_find_next_bit
The function changed at some point, but the kernel-doc was not updated.
--- lib/radix-tree.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
lib/radix-tree.c +2 -3
@@ -178,12 +178,11 @@ static inline void all_tag_set(struct radix_tree_node *node, unsigned int tag)* radix_tree_find_next_bit - find the next set bit in a memory region * * @addr: The address to base the search on -* @size: The bitmap size in bits +* @tag: The tag index (< RADIX_TREE_MAX_TAGS) * @offset: The bitnumber to start searching at * * Unrollable variant of find_next_bit() for constant size arrays. -* Tail bits starting from size to roundup(size, BITS_PER_LONG) must be zero. -* Returns next bit offset, or size if nothing found. +* Returns next bit offset, or RADIX_TREE_MAP_SIZE if nothing found. */ static __always_inline unsigned long radix_tree_find_next_bit(struct radix_tree_node *node, unsigned int tag,
Signature · 1 line
2.17.1
PATCH 2/2 radix-tree: fix a typo
In reply to Qiujun Huang"iff" -> "if"
--- lib/radix-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/radix-tree.c +1 -1
@@ -794,7 +794,7 @@ void *__radix_tree_lookup(const struct radix_tree_root *root,* Returns: the slot corresponding to the position @index in the * radix tree @root. This is useful for update-if-exists operations. * -* This function can be called under rcu_read_lock iff the slot is not +* This function can be called under rcu_read_lock if the slot is not * modified by radix_tree_replace_slot, otherwise it must be called * exclusive from other writers. Any dereference of the slot must be done * using radix_tree_deref_slot.
Signature · 1 line
2.17.1
Re: [PATCH 2/2] radix-tree: fix a typo
Quoted 4 lines · Qiujun Huang
"iff" -> "if"
- * This function can be called under
rcu_read_lockiff the slot is not
+ * This function can be called underrcu_read_lockif the slot is not
That's not a typo, it's a mathematician's shorthand for "if and only if". I'm not excited about fixing problems in the radix tree code; better to focus efforts on migrating users to the xarray.
http://git.infradead.org/users/willy/linux-dax.git/shortlog/refs/heads/xarray-conv
is an out of date effort to do every user.
Re: [PATCH 1/2] radix-tree: fix kernel-doc for radix_tree_find_next_bit
In reply to Qiujun HuangQuoted 6 lines · Qiujun Huang
*
radix_tree_find_next_bit- find the next set bit in a memory region *
* @addr: The address to base the search on
- * @size: The bitmap size in bits
+ * @tag: The tag index (<RADIX_TREE_MAX_TAGS)
* @offset: The bitnumber to start searching at
Quoted 8 lines
*
* Unrollable variant offind_next_bit()for constant size arrays.
- * Tail bits starting from size toroundup(size, BITS_PER_LONG)must be zero.
- * Returns next bit offset, or size if nothing found.
+ * Returns next bit offset, orRADIX_TREE_MAP_SIZEif nothing found. */
static__always_inlineunsigned long radix_tree_find_next_bit(structradix_tree_node*node, unsigned int tag,
Ugh, this is a static function with kernel-doc. What a waste of time ;-(
Re: [PATCH 2/2] radix-tree: fix a typo
In reply to Matthew WilcoxQuoted 10 lines · Matthew Wilcox
Quoted 4 lines · Qiujun Huang
"iff" -> "if"
- * This function can be called under
rcu_read_lockiff the slot is not
+ * This function can be called underrcu_read_lockif the slot is notThat's not a typo, it's a mathematician's shorthand for "if and only if". I'm not excited about fixing problems in the radix tree code; better to focus efforts on migrating users to the xarray.
I get that, thanks.
Quoted 3 lines
http://git.infradead.org/users/willy/linux-dax.git/shortlog/refs/heads/xarray-conv
is an out of date effort to do every user.
Re: [PATCH 1/2] radix-tree: fix kernel-doc for radix_tree_find_next_bit
In reply to Matthew WilcoxI thought it's better to update the function description as it could be more readable from source code.
Quoted 18 lines · Matthew Wilcox
Quoted 6 lines · Qiujun Huang
*
radix_tree_find_next_bit- find the next set bit in a memory region *
* @addr: The address to base the search on
- * @size: The bitmap size in bits
+ * @tag: The tag index (<RADIX_TREE_MAX_TAGS)
* @offset: The bitnumber to start searching atQuoted 8 lines
*
* Unrollable variant offind_next_bit()for constant size arrays.
- * Tail bits starting from size toroundup(size, BITS_PER_LONG)must be zero.
- * Returns next bit offset, or size if nothing found.
+ * Returns next bit offset, orRADIX_TREE_MAP_SIZEif nothing found. */
static__always_inlineunsigned long radix_tree_find_next_bit(structradix_tree_node*node, unsigned int tag,Ugh, this is a static function with kernel-doc. What a waste of time ;-(