From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91B93C4741F for ; Wed, 4 Nov 2020 17:13:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4847F2075E for ; Wed, 4 Nov 2020 17:13:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726793AbgKDRM6 (ORCPT ); Wed, 4 Nov 2020 12:12:58 -0500 Received: from smtprelay0137.hostedemail.com ([216.40.44.137]:53192 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726746AbgKDRM6 (ORCPT ); Wed, 4 Nov 2020 12:12:58 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 59C52100E7B4A; Wed, 4 Nov 2020 17:12:57 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: corn41_551230a272c2 X-Filterd-Recvd-Size: 3173 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf16.hostedemail.com (Postfix) with ESMTPA; Wed, 4 Nov 2020 17:12:55 +0000 (UTC) Message-ID: <57b77f3a36f56e2ae7ab8fe367865b5412d4e11f.camel@perches.com> Subject: Re: [PATCH] ACPI: Remove trailing whitespace From: Joe Perches To: Maximilian Luz , Bjorn Helgaas Cc: linux-acpi@vger.kernel.org, "Rafael J. Wysocki" , Len Brown , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 04 Nov 2020 09:12:54 -0800 In-Reply-To: <6d888eb0-bfc5-28ff-c62f-9e769f77bc1f@gmail.com> References: <20201103211259.GA265488@bjorn-Precision-5520> <6e392d099bd8aaba14223aa770361dbdeeab271b.camel@perches.com> <6d888eb0-bfc5-28ff-c62f-9e769f77bc1f@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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. 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/. I don't know. https://acpica.org/downloads/linux cheers, Joe