Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
From: Weihang Li <liweihang@huawei.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: <dledford@redhat.com>, <leon@kernel.org>,
	<linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>
Subject: Re: [PATCH for-next 7/7] RDMA/hns: Fix coding style issues
Date: Wed, 8 Jan 2020 09:42:57 +0800
Message-ID: <6df9e9a1-5a26-ceb8-6d41-f7c81a194617@huawei.com> (raw)
In-Reply-To: <20200107203121.GA5313@ziepe.ca>



On 2020/1/8 4:31, Jason Gunthorpe wrote:
> On Mon, Jan 06, 2020 at 08:21:16PM +0800, Weihang Li wrote:
>> From: Lijun Ou <oulijun@huawei.com>
>>
>> Fix some coding style issuses without changing logic of codes, most of the
>> modification is unreasonable line breaks and alignments.
>>
>> Signed-off-by: Lijun Ou <oulijun@huawei.com>
>> Signed-off-by: Lang Cheng <chenglang@huawei.com>
>> Signed-off-by: Weihang Li <liweihang@huawei.com>
>> ---
>>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 167 ++++++++++-------------------
>>  drivers/infiniband/hw/hns/hns_roce_main.c  |  56 +++++-----
>>  2 files changed, 86 insertions(+), 137 deletions(-)
> 
> If you are going to be re-intending code please at least refer to
> clang-format's presentation. I recommend clang-format as an
> interactive editor plugin to do single statement reformatting on
> demand to help follow the coding style.
> 
> I ran it over the lines changed here and it suggested the below, which
> seems like a reasonable improvement so I folded it in:
>  - One line is better than two
>  - Subexpressions crossing lines should be indented more than the
>    normal indent. ie
>     foo(a &
>           B,
>         c)
>  - ?: should line up under the ?
> 

Hi Jason,

Thanks for your advice and your modifications on this patch :)
We will use clang-format and other tools to help fix coding style issues
next time.

Weihang


  reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 12:21 [PATCH for-next 0/7] RDMA/hns: Various cleanups Weihang Li
2020-01-06 12:21 ` [PATCH for-next 1/7] RDMA/hns: Avoid printing address of mtt page Weihang Li
2020-01-06 12:21 ` [PATCH for-next 2/7] RDMA/hns: Remove unused function hns_roce_init_eq_table() Weihang Li
2020-01-06 12:21 ` [PATCH for-next 3/7] RDMA/hns: Update the value of qp type Weihang Li
2020-01-06 12:21 ` [PATCH for-next 4/7] RDMA/hns: Delete unnessary parameters in hns_roce_v2_qp_modify() Weihang Li
2020-01-06 12:21 ` [PATCH for-next 5/7] RDMA/hns: Remove redundant print information Weihang Li
2020-01-06 12:21 ` [PATCH for-next 6/7] RDMA/hns: Replace custom macros HNS_ROCE_ALIGN_UP Weihang Li
2020-01-06 12:21 ` [PATCH for-next 7/7] RDMA/hns: Fix coding style issues Weihang Li
2020-01-07 20:31   ` Jason Gunthorpe
2020-01-08  1:42     ` Weihang Li [this message]
2020-01-07 20:31 ` [PATCH for-next 0/7] RDMA/hns: Various cleanups Jason Gunthorpe

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6df9e9a1-5a26-ceb8-6d41-f7c81a194617@huawei.com \
    --to=liweihang@huawei.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git