Re: [PATCH for-next 7/7] RDMA/hns: Fix coding style issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxx>
>>
>> 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@xxxxxxxxxx>
>> Signed-off-by: Lang Cheng <chenglang@xxxxxxxxxx>
>> Signed-off-by: Weihang Li <liweihang@xxxxxxxxxx>
>> ---
>>  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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux