[PATCH v1 2/6] amso1100: convert to using idr_alloc_cyclic

2013-03-27 Thread Jeff Layton
(Note: compile-tested only) Signed-off-by: Jeff Layton jlay...@redhat.com Cc: Tejun Heo t...@kernel.org Cc: Steve Wise sw...@opengridcomputing.com Cc: Tom Tucker t...@opengridcomputing.com Cc: linux-rdma@vger.kernel.org --- drivers/infiniband/hw/amso1100/c2.h| 1 -

Re: [PATCH v1 2/6] amso1100: convert to using idr_alloc_cyclic

2013-03-27 Thread Tejun Heo
On Wed, Mar 27, 2013 at 09:18:04AM -0400, Jeff Layton wrote: void c2_init_qp_table(struct c2_dev *c2dev) { spin_lock_init(c2dev-qp_table.lock); - idr_init(c2dev-qp_table.idr); + idr_init_cyclic(c2dev-qp_table.idr, 0); } Why is this necessary? In general, why is

Re: [PATCH v1 2/6] amso1100: convert to using idr_alloc_cyclic

2013-03-27 Thread Jeff Layton
On Wed, 27 Mar 2013 09:27:55 -0700 Tejun Heo t...@kernel.org wrote: On Wed, Mar 27, 2013 at 09:18:04AM -0400, Jeff Layton wrote: void c2_init_qp_table(struct c2_dev *c2dev) { spin_lock_init(c2dev-qp_table.lock); - idr_init(c2dev-qp_table.idr); +