Re: [patch v2 28/37] add rxe_arbiter.c
From: Bart Van Assche <hidden>
Date: 2011-08-10 18:46:38
On Sun, Jul 24, 2011 at 9:43 PM, [off-list ref] 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html