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 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); > > + idr_init_cyclic(&c2dev->qp_tabl

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