interval_tree: Fix ITSTATIC usage for *_subtree_search()
For consistency with the other function templates, change _subtree_search_*() to use the user-supplied ITSTATIC rather than the hard-coded 'static'. Acked-by: Petr Mladek <pmladek@suse.com> Tested-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
This commit is contained in:
parent
9b7eacac22
commit
b37491d72b
6 changed files with 13 additions and 2 deletions
|
|
@ -53,6 +53,10 @@ extern void
|
||||||
usnic_uiom_interval_tree_remove(struct usnic_uiom_interval_node *node,
|
usnic_uiom_interval_tree_remove(struct usnic_uiom_interval_node *node,
|
||||||
struct rb_root_cached *root);
|
struct rb_root_cached *root);
|
||||||
extern struct usnic_uiom_interval_node *
|
extern struct usnic_uiom_interval_node *
|
||||||
|
usnic_uiom_interval_tree_subtree_search(struct usnic_uiom_interval_node *node,
|
||||||
|
unsigned long start,
|
||||||
|
unsigned long last);
|
||||||
|
extern struct usnic_uiom_interval_node *
|
||||||
usnic_uiom_interval_tree_iter_first(struct rb_root_cached *root,
|
usnic_uiom_interval_tree_iter_first(struct rb_root_cached *root,
|
||||||
unsigned long start,
|
unsigned long start,
|
||||||
unsigned long last);
|
unsigned long last);
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,10 @@ extern void
|
||||||
interval_tree_remove(struct interval_tree_node *node,
|
interval_tree_remove(struct interval_tree_node *node,
|
||||||
struct rb_root_cached *root);
|
struct rb_root_cached *root);
|
||||||
|
|
||||||
|
extern struct interval_tree_node *
|
||||||
|
interval_tree_subtree_search(struct interval_tree_node *node,
|
||||||
|
unsigned long start, unsigned long last);
|
||||||
|
|
||||||
extern struct interval_tree_node *
|
extern struct interval_tree_node *
|
||||||
interval_tree_iter_first(struct rb_root_cached *root,
|
interval_tree_iter_first(struct rb_root_cached *root,
|
||||||
unsigned long start, unsigned long last);
|
unsigned long start, unsigned long last);
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node, \
|
||||||
* Cond2: start <= ITLAST(node) \
|
* Cond2: start <= ITLAST(node) \
|
||||||
*/ \
|
*/ \
|
||||||
\
|
\
|
||||||
static ITSTRUCT * \
|
ITSTATIC ITSTRUCT * \
|
||||||
ITPREFIX ## _subtree_search(ITSTRUCT *node, ITTYPE start, ITTYPE last) \
|
ITPREFIX ## _subtree_search(ITSTRUCT *node, ITTYPE start, ITTYPE last) \
|
||||||
{ \
|
{ \
|
||||||
while (true) { \
|
while (true) { \
|
||||||
|
|
|
||||||
|
|
@ -3369,6 +3369,8 @@ void vma_interval_tree_insert_after(struct vm_area_struct *node,
|
||||||
struct rb_root_cached *root);
|
struct rb_root_cached *root);
|
||||||
void vma_interval_tree_remove(struct vm_area_struct *node,
|
void vma_interval_tree_remove(struct vm_area_struct *node,
|
||||||
struct rb_root_cached *root);
|
struct rb_root_cached *root);
|
||||||
|
struct vm_area_struct *vma_interval_tree_subtree_search(struct vm_area_struct *node,
|
||||||
|
unsigned long start, unsigned long last);
|
||||||
struct vm_area_struct *vma_interval_tree_iter_first(struct rb_root_cached *root,
|
struct vm_area_struct *vma_interval_tree_iter_first(struct rb_root_cached *root,
|
||||||
unsigned long start, unsigned long last);
|
unsigned long start, unsigned long last);
|
||||||
struct vm_area_struct *vma_interval_tree_iter_next(struct vm_area_struct *node,
|
struct vm_area_struct *vma_interval_tree_iter_next(struct vm_area_struct *node,
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ INTERVAL_TREE_DEFINE(struct interval_tree_node, rb,
|
||||||
|
|
||||||
EXPORT_SYMBOL_GPL(interval_tree_insert);
|
EXPORT_SYMBOL_GPL(interval_tree_insert);
|
||||||
EXPORT_SYMBOL_GPL(interval_tree_remove);
|
EXPORT_SYMBOL_GPL(interval_tree_remove);
|
||||||
|
EXPORT_SYMBOL_GPL(interval_tree_subtree_search);
|
||||||
EXPORT_SYMBOL_GPL(interval_tree_iter_first);
|
EXPORT_SYMBOL_GPL(interval_tree_iter_first);
|
||||||
EXPORT_SYMBOL_GPL(interval_tree_iter_next);
|
EXPORT_SYMBOL_GPL(interval_tree_iter_next);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node, \
|
||||||
* Cond2: start <= ITLAST(node) \
|
* Cond2: start <= ITLAST(node) \
|
||||||
*/ \
|
*/ \
|
||||||
\
|
\
|
||||||
static ITSTRUCT * \
|
ITSTATIC ITSTRUCT * \
|
||||||
ITPREFIX ## _subtree_search(ITSTRUCT *node, ITTYPE start, ITTYPE last) \
|
ITPREFIX ## _subtree_search(ITSTRUCT *node, ITTYPE start, ITTYPE last) \
|
||||||
{ \
|
{ \
|
||||||
while (true) { \
|
while (true) { \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue