Re: [PATCH 1/2] RDMA/erdma: Use the bitmap API to allocate bitmaps

From: Cheng Xu
Date: Tue Jul 12 2022 - 05:56:19 EST




On 7/12/22 5:01 PM, Dan Carpenter wrote:
> On Mon, Jul 11, 2022 at 03:34:56PM +0800, Cheng Xu wrote:
>>
>>
>> On 7/9/22 1:37 AM, Christophe JAILLET wrote:
>>> Use [devm_]bitmap_zalloc()/bitmap_free() instead of hand-writing them.
>>>
>>> It is less verbose and it improves the semantic.
>>>
>>> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
>>> ---
>>> drivers/infiniband/hw/erdma/erdma_cmdq.c | 7 +++----
>>> drivers/infiniband/hw/erdma/erdma_main.c | 9 ++++-----
>>> 2 files changed, 7 insertions(+), 9 deletions(-)
>>>
>>
>> Hi Christophe,
>>
>> Thanks for your two patches of erdma.
>>
>> The erdma code your got is our first upstreaming code, so I would like to squash your
>> changes into the relevant commit in our next patchset to make the commit history cleaner.
>>
>> BTW, the coding style in the patches is OK, but has a little differences with clang-format's
>> result. I will use the format from clang-format to minimize manual adjustments.
>>
>
> Best not to use any auto-formatting tools. They are all bad.
>
I understand your worry. Tool is not prefect but it's useful to handle large amounts of code in
our first upstream, and helps us avoiding style mistakes.

While using the clang-format with the config in kernel tree, we also checked all the modifications
made by the tool carefully. We won't rely on tools too much with small changes in the future.

Thanks,
Cheng Xu