Message ID | 1364412578-7462-3-git-send-email-jlayton@redhat.com (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
On Wed, Mar 27, 2013 at 03:29:34PM -0400, Jeff Layton wrote: > (Note: compile-tested only) > > Signed-off-by: Jeff Layton <jlayton@redhat.com> > Cc: Tejun Heo <tj@kernel.org> > Cc: Steve Wise <swise@opengridcomputing.com> > Cc: Tom Tucker <tom@opengridcomputing.com> > Cc: linux-rdma@vger.kernel.org Reviewed-by: Tejun Heo <tj@kernel.org> Thanks.
diff --git a/drivers/infiniband/hw/amso1100/c2.h b/drivers/infiniband/hw/amso1100/c2.h index ba7a1208..d619d73 100644 --- a/drivers/infiniband/hw/amso1100/c2.h +++ b/drivers/infiniband/hw/amso1100/c2.h @@ -265,7 +265,6 @@ struct c2_pd_table { struct c2_qp_table { struct idr idr; spinlock_t lock; - int last; }; struct c2_element { diff --git a/drivers/infiniband/hw/amso1100/c2_qp.c b/drivers/infiniband/hw/amso1100/c2_qp.c index 0ab826b..86708de 100644 --- a/drivers/infiniband/hw/amso1100/c2_qp.c +++ b/drivers/infiniband/hw/amso1100/c2_qp.c @@ -385,8 +385,7 @@ static int c2_alloc_qpn(struct c2_dev *c2dev, struct c2_qp *qp) idr_preload(GFP_KERNEL); spin_lock_irq(&c2dev->qp_table.lock); - ret = idr_alloc(&c2dev->qp_table.idr, qp, c2dev->qp_table.last++, 0, - GFP_NOWAIT); + ret = idr_alloc_cyclic(&c2dev->qp_table.idr, qp, 0, 0, GFP_NOWAIT); if (ret >= 0) qp->qpn = ret;
(Note: compile-tested only) Signed-off-by: Jeff Layton <jlayton@redhat.com> Cc: Tejun Heo <tj@kernel.org> Cc: Steve Wise <swise@opengridcomputing.com> Cc: Tom Tucker <tom@opengridcomputing.com> Cc: linux-rdma@vger.kernel.org --- drivers/infiniband/hw/amso1100/c2.h | 1 - drivers/infiniband/hw/amso1100/c2_qp.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-)