Blob Blame History Raw
From: Matthew Wilcox <mawilcox@microsoft.com>
Date: Tue, 28 Nov 2017 10:01:24 -0500
Subject: idr: Delete idr_find_ext function
Patch-mainline: v4.16-rc1
Git-commit: 322d884ba731e05ca79ae58e9dee1ef7dc4de504
References: bsc#1109837

Simply changing idr_remove's 'id' argument to 'unsigned long' works
for all callers.

Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 include/linux/idr.h    |    7 +------
 net/sched/act_api.c    |    2 +-
 net/sched/cls_api.c    |    2 +-
 net/sched/cls_flower.c |    2 +-
 4 files changed, 4 insertions(+), 9 deletions(-)

--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -178,16 +178,11 @@ static inline void idr_preload_end(void)
  * This function can be called under rcu_read_lock(), given that the leaf
  * pointers lifetimes are correctly managed.
  */
-static inline void *idr_find_ext(const struct idr *idr, unsigned long id)
+static inline void *idr_find(const struct idr *idr, unsigned long id)
 {
 	return radix_tree_lookup(&idr->idr_rt, id);
 }
 
-static inline void *idr_find(const struct idr *idr, int id)
-{
-	return idr_find_ext(idr, id);
-}
-
 /**
  * idr_for_each_entry - iterate over an idr's elements of a given type
  * @idr:     idr handle
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -223,7 +223,7 @@ static struct tc_action *tcf_idr_lookup(
 	struct tc_action *p = NULL;
 
 	spin_lock_bh(&idrinfo->lock);
-	p = idr_find_ext(&idrinfo->action_idr, index);
+	p = idr_find(&idrinfo->action_idr, index);
 	spin_unlock_bh(&idrinfo->lock);
 
 	return p;
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -435,7 +435,7 @@ static struct tcf_block *tcf_block_looku
 {
 	struct tcf_net *tn = net_generic(net, tcf_net_id);
 
-	return idr_find_ext(&tn->idr, block_index);
+	return idr_find(&tn->idr, block_index);
 }
 
 static struct tcf_chain *tcf_block_chain_zero(struct tcf_block *block)
--- a/net/sched/cls_flower.c
+++ b/net/sched/cls_flower.c
@@ -333,7 +333,7 @@ static void *fl_get(struct tcf_proto *tp
 {
 	struct cls_fl_head *head = rtnl_dereference(tp->root);
 
-	return idr_find_ext(&head->handle_idr, handle);
+	return idr_find(&head->handle_idr, handle);
 }
 
 static const struct nla_policy fl_policy[TCA_FLOWER_MAX + 1] = {