Re: [PATCH v2] certs/extract-cert: Fix checkpatch issues

From: Dan Carpenter
Date: Tue Jun 06 2023 - 14:29:22 EST


On Tue, Jun 06, 2023 at 07:59:02PM +0200, Franziska Näpelt wrote:
> Am Di., 6. Juni 2023 um 18:03 Uhr schrieb Jarkko Sakkinen <jarkko@xxxxxxxxxx>:
> > On Tue Jun 6, 2023 at 6:25 PM EEST, Dan Carpenter wrote:
> > > On Tue, Jun 06, 2023 at 05:51:09PM +0300, Jarkko Sakkinen wrote:
> > > > On Tue Jun 6, 2023 at 4:38 PM EEST, Dan Carpenter wrote:
> > > > > On Tue, Jun 06, 2023 at 07:28:52PM +0700, Bagas Sanjaya wrote:
> > > > > > On Fri, Jun 02, 2023 at 10:59:02AM +0200, Franziska Naepelt wrote:
> > > > > > > The following issues are fixed:
> > > > > > > - WARNING: Missing or malformed SPDX-License-Identifier tag
> > > > > > > - ERROR: trailing statements should be on next line
> > > > > > > - WARNING: braces {} are not necessary for single statement blocks
> > > > > > > - ERROR: space required before the open parenthesis '('
> > > > > > > - ERROR: code indent should use tabs where possible
> > > > > > > - WARNING: please, no spaces at the start of a line
> > > > > > > - WARNING: Missing a blank line after declarations
> > > > > >

[ snip ]

>
> I'm a bit puzzled now since there are different opinions on my patch.
> I'm struggling to draw a conclusion whether to split the patch into smaller
> single line patches or not.
>
> I'd propose to split it into two patches:
> * One for SPDX license tag fix
> * One for spacing, tab, blank line, unnecessary braces etc.

You should definitely pull the SPDX change into its own patch because
it's sightly controversial and important.

In drivers/staging/ we would say pull each type of checkpatch warning
into its own patch so it would be something like 6 patches. But I don't
know how it's done in this subsystem. I feel like Greg maybe goes
overboard on splitting patches up, but the advantage of Greg's system is
that it's easy to explain the rules to newbies. There is a lot about
staging/ which designed around newbies.

If I'm totally honest, in a lot of subsystems the policy is just leave
it alone. Don't bother cleaning up checkpatch stuff because it just
creates more work and makes the git log noisier.

regards,
dan carpenter