On Sun, Jul 24, 2011 at 9:43 PM,  <rpear...@systemfabricworks.com> wrote:
> +int rxe_arbiter(void *arg)
> +{
> +     int err;
> +     unsigned long flags;
> +     struct rxe_dev *rxe = (struct rxe_dev *)arg;
> +     struct sk_buff *skb;
> +     struct list_head *qpl;
> +     struct rxe_qp *qp;
> +
> +     /* get the next qp's send queue */
> +     spin_lock_irqsave(&rxe->arbiter.list_lock, flags);
> +     if (list_empty(&rxe->arbiter.qp_list)) {
> +             spin_unlock_irqrestore(&rxe->arbiter.list_lock, flags);
> +             return 1;
> +     }
> +
> +     qpl = rxe->arbiter.qp_list.next;
> +     list_del_init(qpl);
> +     qp = list_entry(qpl, struct rxe_qp, arbiter_list);
> +     spin_unlock_irqrestore(&rxe->arbiter.list_lock, flags);

Is there a reason why the list_first_entry() macro hasn't been used in
the above code ?

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to