Thread (28 messages) 28 messages, 3 authors, 2016-05-23

Re: [RESEND PATCH v7 17/21] IB/hns: Add QP operations support

From: Doug Ledford <hidden>
Date: 2016-05-13 22:04:07
Also in: linux-rdma, lkml

On 05/09/2016 11:04 PM, Lijun Ou wrote:
quoted hunk ↗ jump to hunk
+static void hns_roce_v1_cq_clean(struct hns_roce_cq *hr_cq, u32 qpn,
+				 struct hns_roce_srq *srq)
+{
+	spin_lock_irq(&hr_cq->lock);
+	hns_roce_v1_clean_cq(hr_cq, qpn, srq);
+	spin_unlock_irq(&hr_cq->lock);
+}
This is a perfect example of what I was talking about in my last email.
The convention here would be to name the main function
__hns_roce_v1_cq_clean and the wrapper hns_roce_v1_cq_clean.  Instead,
you have one named cq_clean and one named clean_cq.  Keeping straight
which of those locks itself and which needs to be called with the lock
held is nigh impossible.

-- 
Doug Ledford [off-list ref]
              GPG KeyID: 0E572FDD

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help