mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [merged] checkpatch-add-a-fixer-for-missing-newline-at-eof.patch removed from -mm tree
@ 2020-12-16 17:09 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-12-16 17:09 UTC (permalink / raw)
  To: joe, mm-commits, trix


The patch titled
     Subject: checkpatch: add a fixer for missing newline at eof
has been removed from the -mm tree.  Its filename was
     checkpatch-add-a-fixer-for-missing-newline-at-eof.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Tom Rix <trix@redhat.com>
Subject: checkpatch: add a fixer for missing newline at eof

Remove the trailing error message from the fixed lines.

Link: https://lkml.kernel.org/r/20201017142546.28988-1-trix@redhat.com
Signed-off-by: Tom Rix <trix@redhat.com>
Acked-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/checkpatch.pl |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/scripts/checkpatch.pl~checkpatch-add-a-fixer-for-missing-newline-at-eof
+++ a/scripts/checkpatch.pl
@@ -3418,8 +3418,11 @@ sub process {
 
 # check for adding lines without a newline.
 		if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file/) {
-			WARN("MISSING_EOF_NEWLINE",
-			     "adding a line without newline at end of file\n" . $herecurr);
+			if (WARN("MISSING_EOF_NEWLINE",
+			         "adding a line without newline at end of file\n" . $herecurr) &&
+			    $fix) {
+				fix_delete_line($fixlinenr+1, "No newline at end of file");
+			}
 		}
 
 # check we are in a valid source file C or perl if not then ignore this hunk
_

Patches currently in -mm which might be from trix@redhat.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-16 17:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 17:09 [merged] checkpatch-add-a-fixer-for-missing-newline-at-eof.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).