[dpdk-dev] [PATCH v2 3/5] net/hns3: adjust some code style

Ferruh Yigit ferruh.yigit at intel.com
Mon Nov 9 11:51:46 CET 2020


On 11/9/2020 9:32 AM, oulijun wrote:
> 
> 
> 在 2020/11/7 0:44, Ferruh Yigit 写道:
>> On 11/6/2020 3:51 AM, Lijun Ou wrote:
>>> From: Hongbo Zheng <zhenghongbo3 at huawei.com>
>>>
>>> Here adjusts some code style for making the lines more
>>> compact and removes some static check tool warnings.
>>>
>>> Signed-off-by: Hongbo Zheng <zhenghongbo3 at huawei.com>
>>> Signed-off-by: Lijun Ou <oulijun at huawei.com>
>>> ---
>>> V1->V2:
>>> - fix checkpatch warning
>>> ---
>>>   drivers/net/hns3/hns3_cmd.c    |   1 -
>>>   drivers/net/hns3/hns3_ethdev.c |   6 +-
>>>   drivers/net/hns3/hns3_ethdev.h |   1 -
>>>   drivers/net/hns3/hns3_flow.c   |  37 +-
>>>   drivers/net/hns3/hns3_intr.c   | 873 +++++++++++++++++++++++++++--------------
>>>   drivers/net/hns3/hns3_rxtx.c   |   1 -
>>>   drivers/net/hns3/hns3_stats.c  |   1 -
>>>   7 files changed, 597 insertions(+), 323 deletions(-)
>>
>> This is a big(ish) patch with just whitespace changes, looks like related to 
>> the personal preferences.
>> This will create noise in the git history, and unnecessary conflict in 
>> backporting patches.
>>
>> I know it is tempting to fix here or there :), but lets fix those when 
>> updating those lines for a functional change, and drop this patch.
>> .
> Requirements for some static check tools:
> When struct and union members are initialized, each member is initialized on a 
> separate line.
> We think this requirement can be a better code style.
> We can split the just whitespace changes with the above requirements?
> because the Redundant blank lines  alarms.
> 

I see, so the changes in 'hns3_intr.c' is coming from that requirement, yes can 
you please separate each static analyzer warning into its patch with explanation 
in the commit log why the change is done. And I think can drop the just 
whitespace changes.

Thanks,
ferruh


More information about the dev mailing list