mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Rix <trix@redhat.com>
To: Joe Perches <joe@perches.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Finn Thain <fthain@linux-m68k.org>,
	Miguel Ojeda <ojeda@kernel.org>
Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com,
	shivasharan.srikanteshwara@broadcom.com, jejb@linux.ibm.com,
	martin.petersen@oracle.com, nathan@kernel.org,
	megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH] scsi: megaraid: cleanup formatting of megaraid
Date: Fri, 28 Jan 2022 07:30:31 -0800	[thread overview]
Message-ID: <0567fce4-256a-e1b1-dc66-221ba97153d5@redhat.com> (raw)
In-Reply-To: <7bff2de309384b7c9ee71ad90881d1e0bbe0a781.camel@perches.com>


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@linux-m68k.org> wrote:
>>>>>> On Thu, 27 Jan 2022, trix@redhat.com wrote:
>>>>>>
>>>>>>> From: Tom Rix <trix@redhat.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

>
>
>


  reply	other threads:[~2022-01-28 15:30 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 15:19 trix
2022-01-27 22:37 ` Finn Thain
2022-01-27 22:47   ` Nick Desaulniers
2022-01-28  0:32     ` Tom Rix
2022-01-28  2:43       ` Joe Perches
2022-01-28  5:31         ` Tom Rix
2022-01-28  8:41           ` Joe Perches
2022-01-28 15:30             ` Tom Rix [this message]
2022-01-28 16:23               ` Joe Perches
2022-01-28 23:45               ` Finn Thain
2022-01-28  9:39     ` Miguel Ojeda
2022-01-28 17:42 ` Bart Van Assche
2022-01-28 17:59   ` Tom Rix
2022-01-28 19:11     ` Joe Perches
2022-01-28 19:37       ` Tom Rix
2022-03-02 19:14         ` Tom Rix
2022-03-03  8:35           ` Finn Thain
2022-03-03 11:41             ` Konrad Wilhelm Kleine
     [not found]             ` <CABRYuGk+1AGpvfkR7=LTCm+bN4kt55fwQnQXCjidSXWxuMWsiQ@mail.gmail.com>
2022-03-03 22:44               ` Finn Thain
2022-03-03 23:17                 ` Miguel Ojeda
2022-03-03 23:38                   ` Joe Perches
2022-03-04  5:22                     ` Bart Van Assche
2022-03-04  5:40                       ` Joe Perches
2022-03-05  3:22                       ` Finn Thain
2022-03-04  7:47                     ` Finn Thain
2022-03-04 12:31                     ` Miguel Ojeda
2022-03-04 13:46                     ` Tom Rix
2022-03-04 14:02                       ` Miguel Ojeda
2022-03-04 17:36                         ` Joe Perches
2022-03-04 18:48                           ` Miguel Ojeda
2022-03-04 19:28                             ` Joe Perches
2022-03-04 21:04                               ` Miguel Ojeda
2022-03-05  3:32                               ` Finn Thain
2022-03-04 22:38                         ` Tom Rix
2022-01-28 20:30       ` Bart Van Assche

Reply instructions:

You may reply publicly 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=0567fce4-256a-e1b1-dc66-221ba97153d5@redhat.com \
    --to=trix@redhat.com \
    --cc=fthain@linux-m68k.org \
    --cc=jejb@linux.ibm.com \
    --cc=joe@perches.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=martin.petersen@oracle.com \
    --cc=megaraidlinux.pdl@broadcom.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=ojeda@kernel.org \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=sumit.saxena@broadcom.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome