From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932402AbcEMWEH (ORCPT ); Fri, 13 May 2016 18:04:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48977 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932205AbcEMWEE (ORCPT ); Fri, 13 May 2016 18:04:04 -0400 Subject: Re: [RESEND PATCH v7 17/21] IB/hns: Add QP operations support To: Lijun Ou , sean.hefty@intel.com, hal.rosenstock@gmail.com, davem@davemloft.net, jeffrey.t.kirsher@intel.com, jiri@mellanox.com, ogerlitz@mellanox.com References: <1462849483-67927-1-git-send-email-oulijun@huawei.com> <1462849483-67927-18-git-send-email-oulijun@huawei.com> 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 From: Doug Ledford Openpgp: id=AE6B1BDA122B23B4265B1274B826A3330E572FDD; url=pgp.mit.edu Organization: Red Hat, Inc. Message-ID: <16fc19ea-308a-ceee-d2da-4de93c66e2d7@redhat.com> Date: Fri, 13 May 2016 18:04:00 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <1462849483-67927-18-git-send-email-oulijun@huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gqmVEoNUsX4c6WUwINla6lvFkkGeFnUcm" 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: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gqmVEoNUsX4c6WUwINla6lvFkkGeFnUcm Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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. --=20 Doug Ledford GPG KeyID: 0E572FDD --gqmVEoNUsX4c6WUwINla6lvFkkGeFnUcm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJXNk9QAAoJELgmozMOVy/d5KkQAKtVYYM4THOrYfL7ArX+qXUf xzovO2VKoa9Vbf7OtuGlpfF1Uk/RSJVlNFyB5qEo58useH4x5VBTWIvBbtPIvtEC o5PfkAvBfo6hRj7ZuHmxd4/OguZFVkxX7oZXr619Exv9dn33RmgAlWibv2TCYss4 3RUPBDylSkFTjtpr0HWzFOYa8u2KFbprZi477Xf1Ry9R/j25ezSXFgTvXSsGMLy1 cSnvBfvvXcS8sgGmj7Gr4BHWcJeCRcjWAkMe4e/MGA2wUR66gNfHdsbUgAo1u9Ur ZHKKQjqVMb9N1zl4frfPrOkuNNgNX2PPEI0cR1QQMBJ1W0SpBAx2lMpo+cwp2TTh Cl7c4PhfLgQNj3dnkkzmL8cEui4MEzKU7UBXuWLa8CFbP72VYPW6K/0e3MzI8OE/ +ng0OqWVIZhSwSZtYiG5a/+uSdH0nF8y4Fjou4ZXuN8RMKxL0bpJGZ7NZ1YEh/g/ wyRVQvQsb1CrdskjKjAUJGcgwbRkVF/9saW28RZ+rBXbJT+3E/j1AUBI3Ro+i6So FaMjKA5d8IIAbmXJJsMWiKOGAeLHQkcs++NJpcr5eSHzI89QuB4fHVEkTqLKAzkK HhmtmgVt/XfVV3OW4Zi/oaoOXpemXz3GhpsAlEb3xAc8n8t/RElCyIYHGjuDitE8 NfQHoQfCfX+pddFIMcLi =5Mnc -----END PGP SIGNATURE----- --gqmVEoNUsX4c6WUwINla6lvFkkGeFnUcm--