Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2284809pxm; Fri, 4 Mar 2022 13:06:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUlkWMBYRsfASY41xR51ds6aEa2gwFUHhOdFqvTzAhUkKxnm3Kl1/q7Tj7KLOLminCSjwT X-Received: by 2002:a63:e241:0:b0:375:9f87:eb1f with SMTP id y1-20020a63e241000000b003759f87eb1fmr243366pgj.216.1646427971765; Fri, 04 Mar 2022 13:06:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646427971; cv=none; d=google.com; s=arc-20160816; b=zcYgmGPDkInnZkOA3MuBG2Jglt/tDjLz24toC614uE6Rq4zPw8pN+BIuLz0OC/o64K SrhUsTeQdWPRJD6Ls9c70+5g3yyBBQJ7E9DRgvRtsPun31aBjImEHmS1djuLFofr+AUb lfHK2Aw9fkBOwvDwE7GJLFENfAVf5xmpTl/Pb5bn0d2q3X4nyHhiSADFgBSSh55Ij+FC i4oMwMzeoBUu1HymO96K2TU+zS2zVzOyeX64bmnW2uRmUckIENuvE8Du0JSAn4fZxEeS eQXV/csMxvv0JZm4eoawrZEcK2CToR6pFNu7cfuZX6CvSwlguyeLRFmctqgbJxCBaKo9 2/nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=U+E0PkkZm4GMMA/j/YXjv17yT9pu9dITlUBR8RUwlzY=; b=JZO33yZYYs8D/6lhYkIu3PbzYhORzRoSC1IRs8ozDtaFQo8lH8br3WpgidZVtbb+qR zxQPqxRg09nKqFb8GcZykR9/7JtPji9VRjELxSJ5SieIBdnqNYBvlxY/9XKYoV2gkVxk cEWaYT4lk0NaPeXvaH2OM4hxjDrxnkdnTUffkjodabU/p/FpAvvL89QqRP9u7HEZ/xpS 3nLRmOL1geVuPt4Ye9t77ZNSQjKQrp6UEUNN0fMw6WE5UEsDQzVDuPzRztMYmR7LRHGK LUSwjrGqY10KM3+ijGl6v35POg7m69vFbf5LhOrflGsAg4wjgYsWODYe+iq6A0yQkwL4 SitQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VrJT2u3f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e9-20020a17090ab38900b001bd6b5b192csi479310pjr.22.2022.03.04.13.05.53; Fri, 04 Mar 2022 13:06:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VrJT2u3f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229872AbiCDVFg (ORCPT + 99 others); Fri, 4 Mar 2022 16:05:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229850AbiCDVFb (ORCPT ); Fri, 4 Mar 2022 16:05:31 -0500 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37B87BD2E4; Fri, 4 Mar 2022 13:04:43 -0800 (PST) Received: by mail-io1-xd32.google.com with SMTP id t11so10899740ioi.7; Fri, 04 Mar 2022 13:04:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U+E0PkkZm4GMMA/j/YXjv17yT9pu9dITlUBR8RUwlzY=; b=VrJT2u3fwB1RZfA1ws8RJp7Ck2jXPGvKKEFOszNj0C57Etrv6+GbJbRAil6tagMQG0 RX638ubu19X/K9XkbONfcUGenCTxL+Mp2JMslcM/Z7c1FFlN/meurEeQGwvRmxbz03sI chQIb7eanCgBVCCTosn72/gyywDMJSL+HYEQO4KQuVqYyJ9JuuDrCF5oo/WdMoLIlyr8 qZmDjKkWVwyAJG9yOWgVtwosFvs+wgStFxZtleQAG64SogpgNYvtXOar5n4/AzhRFmO8 rBybqYhr2meXAEyw5S6Knkxi1HuKl1xEFrKALABQ1DcHKabFDW7DjI81SLQlxXP3q0cY mM4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U+E0PkkZm4GMMA/j/YXjv17yT9pu9dITlUBR8RUwlzY=; b=05Ki1fnssLK9kfLtGB+su2ZiP/XZ1MGZnKm93yf1MFW6bnMPGXdCk2vbkC/iJFiiot t2xjIRGCx0+g9rOpvkNh0KmRK6ANkwmb6RTe0gEbjDJaTrh2oR3n974cAtreLFgQdAAk QAXkP0KOPa67voiQXri6+31jHTBCbPhxfI17AJKN0nf7Iw2EeyBqSZd0x66jsDzABHbE 3rF5Bkxow/pne9X+M4/CznMdMl/nAqFmJ0qEvmQ19XV8VqezC0+80htdpy5bjZ7QK82J UTRzRdGfLPjKDqtW/N/WfqsbP0F3XDleMh+vrUsckBfToWBZv5jInIMNz2phZlhfivgn 5VMA== X-Gm-Message-State: AOAM530yUMb0K8/b60r62zgkqxGthEmD3BzZe493eaIniKNGtW9bd12C wYdfYJ89mm01YdVZ7ej+Jjd3HlB/fVldcIypLSg= X-Received: by 2002:a6b:661a:0:b0:640:dd42:58ff with SMTP id a26-20020a6b661a000000b00640dd4258ffmr420359ioc.64.1646427882556; Fri, 04 Mar 2022 13:04:42 -0800 (PST) MIME-Version: 1.0 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> <451bb2c394b05928c815f1eb349a1281a687a608.camel@perches.com> In-Reply-To: <451bb2c394b05928c815f1eb349a1281a687a608.camel@perches.com> From: Miguel Ojeda Date: Fri, 4 Mar 2022 22:04:32 +0100 Message-ID: Subject: Re: [PATCH] scsi: megaraid: cleanup formatting of megaraid To: Joe Perches Cc: Tom Rix , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 4, 2022 at 8:28 PM Joe Perches wrote: > > Is that statement really disputable? By "Maybe", I only mean that you may be right (or not), i.e. we cannot really show one way or the other with data. But note that many people (including projects, companies and even programming languages) prefer consistency and automated formatting vs. the alternative. > IYO. I think using an SCCS with better language understanding rather > than a line oriented one could be an improvement. Such a tool could > allow arbitrary style reformatting at check-in/check-out. clang-format is not line oriented. In fact, you may be able to get quite close to what you suggest with clang-format if you have a project that is automatically formatted. > All of these existing code are more human readable than the code > reformatted using clang-format. That is subjective (for some it may be good enough), and anyway you compared it to the current config file (clang-format 4). The point I raised is that clang-format 13 and future versions should be closer to what you expect. And by saying "I rather doubt clang-format will ever be 'close enough'.", then there is little incentive for the clang-format team to actually add support the things we need... > I used whatever is the latest clang-format here with today's -next. > https://releases.llvm.org/download.html I think this may be the source of confusion -- even if you use clang-format 13, you need to edit the config file to use the new options. In other words, when I said something is supported since e.g. clang-format 9, one still needs to enable it in the config file. > Then perhaps you as the maintainer of the kernel's .clang-format file > could update the entries for those new options. No, I cannot, because that is an error, thus breaks users of old clang-format versions. That is why I suggested to track the minimum LLVM supported version in the kernel, i.e. go at least to LLVM 11. And then over time keep upgrading it and getting better output. > I believe the minimum clang version is already 11. Maybe higher. > I don't track clang or use it very much. The clang version I use > though is 13. Yes, I am aware, please see above. The issue and why I did not "just do it" is that people could have been using clang-format from e.g. their distro, but compiling with GCC. > But perhaps tweaking will just improve some cases and worsen others. Yes, of course. > I don't think so. Why? > There is no "one true editor". > There will not be "one true source code formatter" either. Not for every project, but for a single project, there can definitely be a "single formatter". In fact, that is what many other projects do in practice in order to reach a point where automatic formatting is done. Cheers, Miguel