From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753055AbcLEXw1 (ORCPT ); Mon, 5 Dec 2016 18:52:27 -0500 Received: from smtprelay0071.hostedemail.com ([216.40.44.71]:36931 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751500AbcLEXwY (ORCPT ); Mon, 5 Dec 2016 18:52:24 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:2:41:355:379:541:599:800:960:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1431:1437:1515:1516:1518:1535:1593:1594:1605:1606:1730:1747:1777:1792:2197:2199:2393:2553:2559:2562:2828:2911:3138:3139:3140:3141:3142:3622:3834:3865:3866:3867:3868:3870:3871:4117:4250:4321:4425:4560:4605:5007:6119:7576:7974:9545:10004:10848:10967:11026:11232:11473:11657:11658:11914:12043:12438:12555:12740:12760:13439:14659:21063:21080:21221:21433:21451:30041:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:5,LUA_SUMMARY:none X-HE-Tag: frame62_802e669f43635 X-Filterd-Recvd-Size: 6786 Message-ID: <1480981879.5946.0.camel@perches.com> Subject: Re: [PATCH] checkpatch: Don't emit unified-diff error for rename-only patches From: Joe Perches To: Andrew Jeffery , Andy Whitcroft , Andrew Morton Cc: linux-kernel@vger.kernel.org Date: Mon, 05 Dec 2016 15:51:19 -0800 In-Reply-To: <20161205232224.22685-1-andrew@aj.id.au> References: <20161205232224.22685-1-andrew@aj.id.au> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.1-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-12-06 at 10:22 +1100, Andrew Jeffery wrote: > I generated a patch with `git format-patch` which checkpatch thinks is > invalid: > > $ ./scripts/checkpatch.pl lpc-dt/0006-mfd-dt-Move-syscon-bindings-to-syscon-subdirectory.patch > WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? > Documentation/devicetree/bindings/mfd/{ => syscon}/aspeed-scu.txt | 0 > > ERROR: Does not appear to be a unified-diff format patch > > total: 1 errors, 1 warnings, 0 lines checked > > NOTE: For some of the reported defects, checkpatch may be able to > mechanically convert to the typical style using --fix or --fix-inplace. > > lpc-dt/0006-mfd-dt-Move-syscon-bindings-to-syscon-subdirectory.patch has style problems, please review. > > NOTE: If any of the errors are false positives, please report > them to the maintainer, see CHECKPATCH in MAINTAINERS. > > The patch in question was all renames with no edits, giving 100% similarity and > thus no diff markers. > > $ cat lpc-dt/0006-mfd-dt-Move-syscon-bindings-to-syscon-subdirectory.patch > From 325409d9ceca0aa8371dd1f7c7cf4e4b8a92487e Mon Sep 17 00:00:00 2001 > From: Andrew Jeffery > Date: Fri, 2 Dec 2016 12:26:21 +1030 > Subject: [PATCH 6/6] mfd: dt: Move syscon bindings to syscon subdirectory > > The use of syscons is growing, lets collate them in their own part of > the bindings tree. > > Signed-off-by: Andrew Jeffery > --- > Documentation/devicetree/bindings/mfd/{ => syscon}/aspeed-scu.txt | 0 > Documentation/devicetree/bindings/mfd/{ => syscon}/atmel-gpbr.txt | 0 > Documentation/devicetree/bindings/mfd/{ => syscon}/atmel-matrix.txt | 0 > Documentation/devicetree/bindings/mfd/{ => syscon}/atmel-smc.txt | 0 > Documentation/devicetree/bindings/mfd/{ => syscon}/qcom,tcsr.txt | 0 > Documentation/devicetree/bindings/mfd/{ => syscon}/syscon.txt | 0 > .../devicetree/bindings/mfd/{ => syscon}/ti-keystone-devctrl.txt | 0 > 7 files changed, 0 insertions(+), 0 deletions(-) > rename Documentation/devicetree/bindings/mfd/{ => syscon}/aspeed-scu.txt (100%) > rename Documentation/devicetree/bindings/mfd/{ => syscon}/atmel-gpbr.txt (100%) > rename Documentation/devicetree/bindings/mfd/{ => syscon}/atmel-matrix.txt (100%) > rename Documentation/devicetree/bindings/mfd/{ => syscon}/atmel-smc.txt (100%) > rename Documentation/devicetree/bindings/mfd/{ => syscon}/qcom,tcsr.txt (100%) > rename Documentation/devicetree/bindings/mfd/{ => syscon}/syscon.txt (100%) > rename Documentation/devicetree/bindings/mfd/{ => syscon}/ti-keystone-devctrl.txt (100%) > > diff --git a/Documentation/devicetree/bindings/mfd/aspeed-scu.txt b/Documentation/devicetree/bindings/mfd/syscon/aspeed-scu.txt > similarity index 100% > rename from Documentation/devicetree/bindings/mfd/aspeed-scu.txt > rename to Documentation/devicetree/bindings/mfd/syscon/aspeed-scu.txt > diff --git a/Documentation/devicetree/bindings/mfd/atmel-gpbr.txt b/Documentation/devicetree/bindings/mfd/syscon/atmel-gpbr.txt > similarity index 100% > rename from Documentation/devicetree/bindings/mfd/atmel-gpbr.txt > rename to Documentation/devicetree/bindings/mfd/syscon/atmel-gpbr.txt > diff --git a/Documentation/devicetree/bindings/mfd/atmel-matrix.txt b/Documentation/devicetree/bindings/mfd/syscon/atmel-matrix.txt > similarity index 100% > rename from Documentation/devicetree/bindings/mfd/atmel-matrix.txt > rename to Documentation/devicetree/bindings/mfd/syscon/atmel-matrix.txt > diff --git a/Documentation/devicetree/bindings/mfd/atmel-smc.txt b/Documentation/devicetree/bindings/mfd/syscon/atmel-smc.txt > similarity index 100% > rename from Documentation/devicetree/bindings/mfd/atmel-smc.txt > rename to Documentation/devicetree/bindings/mfd/syscon/atmel-smc.txt > diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.txt b/Documentation/devicetree/bindings/mfd/syscon/qcom,tcsr.txt > similarity index 100% > rename from Documentation/devicetree/bindings/mfd/qcom,tcsr.txt > rename to Documentation/devicetree/bindings/mfd/syscon/qcom,tcsr.txt > diff --git a/Documentation/devicetree/bindings/mfd/syscon.txt b/Documentation/devicetree/bindings/mfd/syscon/syscon.txt > similarity index 100% > rename from Documentation/devicetree/bindings/mfd/syscon.txt > rename to Documentation/devicetree/bindings/mfd/syscon/syscon.txt > diff --git a/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt b/Documentation/devicetree/bindings/mfd/syscon/ti-keystone-devctrl.txt > similarity index 100% > rename from Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt > rename to Documentation/devicetree/bindings/mfd/syscon/ti-keystone-devctrl.txt > -- > 2.9.3 > > Set '$is_patch = 1;' in the add/remove/rename detection to avoid > generating spurious warnings. > > Signed-off-by: Andrew Jeffery > --- > scripts/checkpatch.pl | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index a8368d1c4348..9a434eb4aac4 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -2589,6 +2589,7 @@ sub process { > $line =~ /^rename (?:from|to) [\w\/\.\-]+\s*$/ || > ($line =~ /\{\s*([\w\/\.\-]*)\s*\=\>\s*([\w\/\.\-]*)\s*\}/ && > (defined($1) || defined($2))))) { > + $is_patch = 1; > $reported_maintainer_file = 1; > WARN("FILE_PATH_CHANGES", > "added, moved or deleted file(s), does MAINTAINERS need updating?\n" . $herecurr); Seems sensible, thanks. Acked-by: Joe Perches