Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1401004
| From | Doug Ledford <dledford@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RESEND PATCH v7 17/21] IB/hns: Add QP operations support |
| Date | 2016-05-14 00:10 +0200 |
| Message-ID | <rytrr-3RI-1@gated-at.bofh.it> (permalink) |
| References | <rx63T-1LN-5@gated-at.bofh.it> <rx63U-1LN-19@gated-at.bofh.it> |
| Organization | Red Hat, Inc. |
[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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [RESEND PATCH v7 17/21] IB/hns: Add QP operations support Doug Ledford <dledford@redhat.com> - 2016-05-14 00:10 +0200
csiph-web