Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1401004 > unrolled thread

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

Started byDoug Ledford <dledford@redhat.com>
First post2016-05-14 00:10 +0200
Last post2016-05-14 00:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RESEND PATCH v7 17/21] IB/hns: Add QP operations support Doug Ledford <dledford@redhat.com> - 2016-05-14 00:10 +0200

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

FromDoug Ledford <dledford@redhat.com>
Date2016-05-14 00:10 +0200
SubjectRe: [RESEND PATCH v7 17/21] IB/hns: Add QP operations support
Message-ID<rytrr-3RI-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On 05/09/2016 11:04 PM, Lijun Ou wrote:
> +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 <dledford@redhat.com>
              GPG KeyID: 0E572FDD


[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web