lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 28 Jan 2022 07:30:31 -0800
From:   Tom Rix <trix@...hat.com>
To:     Joe Perches <joe@...ches.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Finn Thain <fthain@...ux-m68k.org>,
        Miguel Ojeda <ojeda@...nel.org>
Cc:     kashyap.desai@...adcom.com, sumit.saxena@...adcom.com,
        shivasharan.srikanteshwara@...adcom.com, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, nathan@...nel.org,
        megaraidlinux.pdl@...adcom.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] scsi: megaraid: cleanup formatting of megaraid


On 1/28/22 12:41 AM, Joe Perches wrote:
> On Thu, 2022-01-27 at 21:31 -0800, Tom Rix wrote:
>> On 1/27/22 6:43 PM, Joe Perches wrote:
>>> On Thu, 2022-01-27 at 16:32 -0800, Tom Rix wrote:
>>>> On 1/27/22 2:47 PM, Nick Desaulniers wrote:
>>>>> + Miguel (the clang-format maintainer), Joe (checkpatch maintainer)
>>>>> These criticisms are worth reviewing.
>>>>>
>>>>> On Thu, Jan 27, 2022 at 2:38 PM Finn Thain <fthain@...ux-m68k.org> wrote:
>>>>>> On Thu, 27 Jan 2022, trix@...hat.com wrote:
>>>>>>
>>>>>>> From: Tom Rix <trix@...hat.com>
>>>>>>>
>>>>>>> checkpatch reports several hundred formatting errors. Run these files
>>>>>>> through clang-format and knock off some of them.
>>>>>>>
>>>>>> That method seems like a good recipe for endless churn unless checkpatch
>>>>>> and clang-format really agree about these style rules.
>>>>>>
>>>>>> Why use checkpatch to assess code style, if we could simply diff the
>>>>>> existing source with the output from clang-format... but it seems that
>>>>>> clang-format harms readability, makes indentation errors and uses
>>>>>> inconsistent style rules. Some examples:
>>>> Problems with clang-format should be fixed, I'll take a look.
>>>>
>>>> I was reviewing this file for another isseue and could not get past how
>>>> horredously bad it was and really did not want to manually fix the 400+
>>>> formatting errors.  I will drop this patch and use the use these files
>>>> to verify the .clang-format .
>>> I think this is more an issue with clang-format than with checkpatch.
>>>
>>> If you have specific issues with what checkpatch reports for this
>>> file (or any other file), let me know.
>> Yes, I agree. Its a clang-format problem.
>>
>> I will be looking to minimize the .clang-format settings to only those
>> that agree with checkpatch.
>>
>> Then add settings back in later if their problems can be worked out.
> Another option would be to use:
>
> 	./scripts/checkpatch.pl -f --fix[-inplace] [--types=<list>] <files>
>
> where types is an optional list of specific things to change
>
> see:
> 	./scripts/checkpatch.pl --list-types --verbose
>
> to show the possible types.
>
> Only some of these types can be changed with --fix or --fix-inplace
>
> If using checkpatch to change formatting, it sometimes can be useful
> to run checkpatch --fix multiple times on the same file as a
> checkpatch --fix can create a change than checkpatch will suggest
> should itself be fixed.
>
> Of course another option is to do nothing as many will complain,
> sometimes senselessly, about 'churn'.

A testsuite for the fixers may help with churn

Any interest or thought on organization ?

I can take stab at one.

Tom

>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ