aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-06-22 10:47:27 -0400
committerRoland Dreier <rolandd@cisco.com>2006-06-22 10:47:27 -0400
commit9b8efc0242777353d5d62bfaa7766ebf0b5598b4 (patch)
treee4379663486936078e2631bc4204bb51d37b1ead /drivers
parent183208284e3ab3816189fc0e23faf29675ce6c9f (diff)
IB/uverbs: Remove unnecessary list_del()s
In ib_uverbs_cleanup_ucontext(), when iterating through the lists of objects, there's no reason to do list_del() to remove the objects, since both the objects and the lists that contain them are about to be freed anyway. Since list_del() is a moderately big inline function, getting rid of this extra work saves quite a bit of .text: add/remove: 0/0 grow/shrink: 1/2 up/down: 3/-217 (-214) function old new delta ib_uverbs_comp_handler 225 228 +3 ib_uverbs_async_handler 256 255 -1 ib_uverbs_close 905 689 -216 Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/core/uverbs_main.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index 5ec2d49e9bb6..dc1f4def3011 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -188,7 +188,6 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file,
188 188
189 idr_remove_uobj(&ib_uverbs_ah_idr, uobj); 189 idr_remove_uobj(&ib_uverbs_ah_idr, uobj);
190 ib_destroy_ah(ah); 190 ib_destroy_ah(ah);
191 list_del(&uobj->list);
192 kfree(uobj); 191 kfree(uobj);
193 } 192 }
194 193
@@ -200,7 +199,6 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file,
200 idr_remove_uobj(&ib_uverbs_qp_idr, uobj); 199 idr_remove_uobj(&ib_uverbs_qp_idr, uobj);
201 ib_uverbs_detach_umcast(qp, uqp); 200 ib_uverbs_detach_umcast(qp, uqp);
202 ib_destroy_qp(qp); 201 ib_destroy_qp(qp);
203 list_del(&uobj->list);
204 ib_uverbs_release_uevent(file, &uqp->uevent); 202 ib_uverbs_release_uevent(file, &uqp->uevent);
205 kfree(uqp); 203 kfree(uqp);
206 } 204 }
@@ -213,7 +211,6 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file,
213 211
214 idr_remove_uobj(&ib_uverbs_cq_idr, uobj); 212 idr_remove_uobj(&ib_uverbs_cq_idr, uobj);
215 ib_destroy_cq(cq); 213 ib_destroy_cq(cq);
216 list_del(&uobj->list);
217 ib_uverbs_release_ucq(file, ev_file, ucq); 214 ib_uverbs_release_ucq(file, ev_file, ucq);
218 kfree(ucq); 215 kfree(ucq);
219 } 216 }
@@ -225,7 +222,6 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file,
225 222
226 idr_remove_uobj(&ib_uverbs_srq_idr, uobj); 223 idr_remove_uobj(&ib_uverbs_srq_idr, uobj);
227 ib_destroy_srq(srq); 224 ib_destroy_srq(srq);
228 list_del(&uobj->list);
229 ib_uverbs_release_uevent(file, uevent); 225 ib_uverbs_release_uevent(file, uevent);
230 kfree(uevent); 226 kfree(uevent);
231 } 227 }
@@ -243,7 +239,6 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file,
243 memobj = container_of(uobj, struct ib_umem_object, uobject); 239 memobj = container_of(uobj, struct ib_umem_object, uobject);
244 ib_umem_release_on_close(mrdev, &memobj->umem); 240 ib_umem_release_on_close(mrdev, &memobj->umem);
245 241
246 list_del(&uobj->list);
247 kfree(memobj); 242 kfree(memobj);
248 } 243 }
249 244
@@ -252,7 +247,6 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file,
252 247
253 idr_remove_uobj(&ib_uverbs_pd_idr, uobj); 248 idr_remove_uobj(&ib_uverbs_pd_idr, uobj);
254 ib_dealloc_pd(pd); 249 ib_dealloc_pd(pd);
255 list_del(&uobj->list);
256 kfree(uobj); 250 kfree(uobj);
257 } 251 }
258 252