From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay5.hostedemail.com (relay5.hostedemail.com [64.99.140.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C73127E for ; Fri, 4 Mar 2022 18:13:06 +0000 (UTC) Received: from omf11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 0D6B625AC1; Fri, 4 Mar 2022 17:37:11 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA id 8345420033; Fri, 4 Mar 2022 17:36:54 +0000 (UTC) Message-ID: Subject: Re: [PATCH] scsi: megaraid: cleanup formatting of megaraid From: Joe Perches To: Miguel Ojeda , Tom Rix Cc: Finn Thain , Konrad Wilhelm Kleine , Bart Van Assche , kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, shivasharan.srikanteshwara@broadcom.com, jejb@linux.ibm.com, martin.petersen@oracle.com, Nathan Chancellor , Nick Desaulniers , megaraidlinux.pdl@broadcom.com, scsi , linux-kernel , llvm@lists.linux.dev In-Reply-To: References: <20220127151945.1244439-1-trix@redhat.com> <0adde369-3fd7-3608-594c-d199cce3c936@redhat.com> <46441b86-1d19-5eb4-0013-db1c63a9b0a5@redhat.com> <8dd05afd-0bb9-c91b-6393-aff69f1363e1@redhat.com> <233660d0-1dee-7d80-1581-2e6845bf7689@linux-m68k.org> <95f5be1d-f5f3-478-5ccb-76556a41de78@linux-m68k.org> <7368bc3ea6dece01004c3e0c194abb0d26d4932b.camel@perches.com> <9dc86e74-7741-bb8e-bbad-ae96cebaaebc@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Fri, 04 Mar 2022 09:36:47 -0800 User-Agent: Evolution 3.40.4-1ubuntu2 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 8345420033 X-Spam-Status: No, score=-2.65 X-Stat-Signature: 1c6ug8i9pqxuqjhad1yefjg3b57awop5 X-Rspamd-Server: rspamout01 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18PthH+crZJzJrKjbbP7DvDY/cONgYvkvc= X-HE-Tag: 1646415414-943187 On Fri, 2022-03-04 at 15:02 +0100, Miguel Ojeda wrote: > On Fri, Mar 4, 2022 at 2:46 PM Tom Rix wrote: > > > > The churn level will be very high. > > Nobody is planning to reformat the entire kernel, at least not until > the tool is close enough to the kernel style, which will take a while. I rather doubt clang-format will ever be 'close enough'. A human's sense of 'taste' for reading code is very different than what an automated tool produces. For instance, clang-format does a quite poor job when comments are intermixed with definitions. Also, try looking at the changes clang-format does on a file chosen at random: $ clang-format -i drivers/hid/hid-sony.c $ git diff drivers/hid/hid-sony.c [...] o columnarized definitions -> not columnarized o odd line continuation placement using spaces and not tabs before \ o odd array definition layouts o per line definitions with comments poorly laid out o individual line definitions rewrapped o enum definitions on multiple lines compressed to single lines o u8 array definition layouts where the first element has a separate meaning than the subsequent elements are compressed and made difficult to understand I think _some_ clang-format output is ok, but the concept of enabling/disabling specific reformatting bits would be quite useful. And sprinkling "clang-format on/off" lines in the code is not good. Any control codes that determine when source code layout might be immutable or allowed to be modified could be should be tool name agnostic.