Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp166709pxp; Sat, 5 Mar 2022 00:57:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkqrlOWnDPXT5nknNzzXloLZPunQyXCcsR6eRjZ+1uoZif9H6SHCm5OGxSt4CBwGt1FTUy X-Received: by 2002:a17:902:bc8c:b0:151:8278:d2bf with SMTP id bb12-20020a170902bc8c00b001518278d2bfmr2517531plb.114.1646470624406; Sat, 05 Mar 2022 00:57:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646470624; cv=none; d=google.com; s=arc-20160816; b=tfEs2h8/CgPZYikDM5LZvC+12cpnk7NkZmNWyOe5E8oj0J3uQ1UqW9OcSn6K6CixV1 laND3gI1cC4+fWLD3VH1UwFR+KGDfrQBuEs4WzsA4gfr288A2EDjtypTvbgZNO25N7QH sr+etWGRVlsf4Yj6FL51XazUFWeeOJZD6BKD/UrGybXL04tn8opj5YHumA0OWKejUpGj CwPAsY+C3+UBhmt+j6lOWfyB9u4Xq4IvmSEW0AEfUp6DBj2nalCDJML1q7uxSeXywvdm wk7EwFLxM28vq1RSdRnc42ZASO+jwebTcMPMTi7BX1gTCFVsJPISAfWge0H2svldyMBi 7Ccg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=g2DFTZBQJCQ8omAwVT2kyLVqv1zNBk5+KkcL67mGkNs=; b=CSd9pFu3zz1zAQH/1NeBrncgRIchZWsoiDOrXkKY6OFVzGu2UXshQMKoqRnZQ2sycu 9mJ3h+aKJEsIYypkomquEoGqS3OZHn1hgzC0gxAx2k8piDPKHllrtScSDl/BjHinA9Fk dhvLAuOWF+3bYRke2c9mwnKgn1TRX58OFSKpXDTqR1B8hTNAPH4wiaJT40f7hd+NjEdk O2c9f7KYZKSa2IQ59pj2LfSwNUc5iq/dLh21OKyoGAdjpFWjaOuh+VTq6aMEyJl84hU4 2YNL7ALj7fCKbSG9t0jv4YX4hYsJ5cCbaWXa9QoJbpIXsz2Ofh7z8nlsU5MzLY+Y2Y+W 7yyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=ihlX5LX0; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h13-20020a056a00170d00b004e1a7fbd67csi7362148pfc.359.2022.03.05.00.56.48; Sat, 05 Mar 2022 00:57:04 -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=@messagingengine.com header.s=fm2 header.b=ihlX5LX0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbiCEDXU (ORCPT + 99 others); Fri, 4 Mar 2022 22:23:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230041AbiCEDXT (ORCPT ); Fri, 4 Mar 2022 22:23:19 -0500 Received: from wnew1-smtp.messagingengine.com (wnew1-smtp.messagingengine.com [64.147.123.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5741410D6; Fri, 4 Mar 2022 19:22:29 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id 3651C2B00280; Fri, 4 Mar 2022 22:22:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 04 Mar 2022 22:22:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=g2DFTZBQJCQ8omAwV T2kyLVqv1zNBk5+KkcL67mGkNs=; b=ihlX5LX0de4QxBmUnvzMaSNTIzRzf/Vye b6ZdkscFcp5bbs+8Y2eemX5X0MeaKIl2aHi5okdZjX+JzIapbxQmc9He3Y22MWWP Qppn7uYug4c/DK0siXYY8XLSAl6Ui98TV4Om+eWAtoNduH+Z+wmLq24Lni+FNStv 70WQqS4G/eQk0IDYFeGY1Ou7yMeqFewNV8FmcGELnOlA4rvE+TmISW5JBHSbLL+w 1vtT7BB4Xhdr2VMVvguVmoNcHIzIwy7XgbiHFeubg8zO6e22hBvUG/9oQQmbB+/f X05yXFGWA+TtDystE9iS2TSlP+ghNUPMViSsoiUFcrlmvRJkBufJg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddtledgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffujgfkfhggtgesthdtredttddtvdenucfhrhhomhephfhinhhnucfv hhgrihhnuceofhhthhgrihhnsehlihhnuhigqdhmieekkhdrohhrgheqnecuggftrfgrth htvghrnhepffduhfegfedvieetudfgleeugeehkeekfeevfffhieevteelvdfhtdevffet uedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfh hthhgrihhnsehlihhnuhigqdhmieekkhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 4 Mar 2022 22:22:23 -0500 (EST) Date: Sat, 5 Mar 2022 14:22:17 +1100 (AEDT) From: Finn Thain To: Bart Van Assche cc: Joe Perches , Miguel Ojeda , Konrad Wilhelm Kleine , Tom Rix , 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 Subject: Re: [PATCH] scsi: megaraid: cleanup formatting of megaraid In-Reply-To: Message-ID: <714bb187-f87-39b7-19a1-f45e95699ba0@linux-m68k.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE, 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 Hi Bart, On Thu, 3 Mar 2022, Bart Van Assche wrote: > On 3/3/22 15:38, Joe Perches wrote: > > One argument is that churn leads to difficulty in backporting fixes to > > older 'stable' versions. > > > > I think the churn argument is overstated. > > I'm often backporting patches to older kernels and I think the churn > argument has not been emphasized enough. Backporting patches is a normal > aspect of a product lifecycle since a kernel version is chosen when > development of a product starts and bugfixes are cherry-picked from > upstream selectively. > That should not be an issue. One of the benefits of having a canonical form for source code is that you also get a canonical form for patches. Let's say you receive a patch (or wish to cherry-pick one) that could be applied to your backport branch, except for superficial changes that cause a (canonical) patch to be rejected. In principle, you can still apply the patch automatically. You "only" require a canonical reformatter that preserves line numbering, and a tree close to the tree on which the patch was based. The process goes like this: 1. Checkout base tree 2. Reformat all the files mentioned in the bad patch, but confined to those lines that appear in the patch. 3. Apply the patch and commit Finally you'd cherry-pick that commit for your backport branch. In case you receive a patch that's whitespace-damaged, you can do this first: 1. Checkout base tree 2. Damage all the files mentioned in the bad patch $ perl -i -p -e 's/\s+/ /g' ... 3. Do the same to the bad patch 4. Apply the bad patch 5. Reformat the files changed by the patch into canonical form 6. Tag that as "B" 7. Checkout base tree 8. Reformat the same files into canonical form 9. Tag that as "A" 10. Produce a good patch $ git diff A..B You can now apply the good patch to your branch. Since it is in canonical form, it may still fail to apply (but see above for the solution). This second example is not really a job for reviewers/maintainers but it could be performed automatically by tooling like patchwork.