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]
Message-ID: <CAJZ5v0j3rboB1RmsEsuKJB38GwJDF-HjUMVZo=eTjWNMQRknRw@mail.gmail.com>
Date:   Wed, 4 Nov 2020 18:20:06 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Joe Perches <joe@...ches.com>
Cc:     Maximilian Luz <luzmaximilian@...il.com>,
        Bjorn Helgaas <helgaas@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Linux PCI <linux-pci@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ACPI: Remove trailing whitespace

On Wed, Nov 4, 2020 at 6:13 PM Joe Perches <joe@...ches.com> wrote:
>
> On Wed, 2020-11-04 at 16:48 +0100, Maximilian Luz wrote:
> > On 11/4/20 6:13 AM, Joe Perches wrote:
> >
> > [...]
> >
> > > > Yes. I scanned drivers/acpi for trailing whitespaces after I noticed a
> > > > couple of them. I did not explicitly scan for other stuff like spaces
> > > > where there should be tabs, mostly because I haven't found a quick and
> > > > reliable solution for that. I only noticed an inconsistent indentation
> > > > when committing, so I fixed that too.
> > >
> > > You could try:
> > >
> > > $ git ls-files -- 'drivers/acpi/*.[ch]' | \
> > >    xargs ./scripts/checkpatch.pl -f --fix-inplace --types=CODE_INDENT
> >
> > Thanks, that indeed looks like a decent solution.
> >
> > > Right now that produces:
> > > ---
> >
> > [...]
> >
> > > diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
> []
> > > @@ -89,7 +89,7 @@ struct acpi_ac {
> > >   #define to_acpi_ac(x) power_supply_get_drvdata(x)
> > >
> > >
> > >   /* --------------------------------------------------------------------------
> > > -                               AC Adapter Management
> > > +                          AC Adapter Management
> > >      -------------------------------------------------------------------------- */
> >
> > I'm not too sure about the comments, but I can find the time to look
> > over the output and adjust that if that's something you'd want me to do.
>
> Up to you.  I hardly looked at the output.
>
> I'd generally prefer to use a single line comment like
>
> /* AC Adapter Management */
>
> but I don't know how often that dashed block is used in ACPI.
>
> grep seems to show the texts are not correctly centered so it seems like
> it was done by hand and not that some automation tool was used to create
> those blocks.
>
> Maybe a separate patch could be done to change those if desired.

If anyone has a problem with them.

> But not by me.
>
> As far as I know, acpi was once autogenerated from a common source tree
> and whitespace changes were once frowned on, but maybe that's changed or
> or perhaps that's only for files in drivers/acpi/acpica/.

The latter.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ