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


Groups > linux.kernel > #1401004

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

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Doug Ledford <dledford@redhat.com>
Newsgroups linux.kernel
Subject Re: [RESEND PATCH v7 17/21] IB/hns: Add QP operations support
Date Sat, 14 May 2016 00:10:01 +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>
X-Original-To Lijun Ou <oulijun@huawei.com>, sean.hefty@intel.com, hal.rosenstock@gmail.com, davem@davemloft.net, jeffrey.t.kirsher@intel.com, jiri@mellanox.com, ogerlitz@mellanox.com
Openpgp id=AE6B1BDA122B23B4265B1274B826A3330E572FDD; url=pgp.mit.edu
Organization Red Hat, Inc.
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0
MIME-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gqmVEoNUsX4c6WUwINla6lvFkkGeFnUcm"
X-Scanned-By MIMEDefang 2.68 on 10.5.11.24
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 13 May 2016 22:04:03 +0000 (UTC)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 52
X-Original-Cc linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, gongyangming@huawei.com, xiaokun@huawei.com, tangchaofei@huawei.com, haifeng.wei@huawei.com, yisen.zhuang@huawei.com, yankejian@huawei.com, charles.chenxin@huawei.com, linuxarm@huawei.com
X-Original-Date Fri, 13 May 2016 18:04:00 -0400
X-Original-Message-ID <16fc19ea-308a-ceee-d2da-4de93c66e2d7@redhat.com>
X-Original-References <1462849483-67927-1-git-send-email-oulijun@huawei.com> <1462849483-67927-18-git-send-email-oulijun@huawei.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1401004

Show key headers only | View raw


[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


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