All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,visitorckw@gmail.com,sfr@canb.auug.org.au,namhyung@kernel.org,lukas.bulwahn@gmail.com,irogers@google.com,dwaipayanray1@gmail.com,apw@canonical.com,joe@perches.com,akpm@linux-foundation.org
Subject: [merged mm-nonmm-stable] checkpatch-add-an-invalid-patch-separator-test.patch removed from -mm tree
Date: Sat, 31 Jan 2026 16:16:40 -0800	[thread overview]
Message-ID: <20260201001641.61ADAC4CEF1@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: checkpatch: add an invalid patch separator test
has been removed from the -mm tree.  Its filename was
     checkpatch-add-an-invalid-patch-separator-test.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Joe Perches <joe@perches.com>
Subject: checkpatch: add an invalid patch separator test
Date: Fri, 16 Jan 2026 09:42:52 -0800

Some versions of tools that apply patches incorrectly allow lines that
start with 3 dashes and have additional content on the same line.

Checkpatch will now emit an ERROR on these lines and optionally convert
those lines from dashes to equals with --fix.

Link: https://lkml.kernel.org/r/6ec1ed08328340db42655287afd5fa4067316b11.camel@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Suggested-by: Ian Rogers <irogers@google.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Kuan-Wei Chiu <visitorckw@gmail.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Namhyung kim <namhyung@kernel.org>
Cc: Stehen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/dev-tools/checkpatch.rst |    5 +++++
 scripts/checkpatch.pl                  |   10 ++++++++++
 2 files changed, 15 insertions(+)

--- a/Documentation/dev-tools/checkpatch.rst~checkpatch-add-an-invalid-patch-separator-test
+++ a/Documentation/dev-tools/checkpatch.rst
@@ -601,6 +601,11 @@ Commit message
 
     See: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
 
+  **BAD_COMMIT_SEPARATOR**
+    The commit separator is a single line with 3 dashes.
+    The regex match is '^---$'
+    Lines that start with 3 dashes and have more content on the same line
+    may confuse tools that apply patches.
 
 Comparison style
 ----------------
--- a/scripts/checkpatch.pl~checkpatch-add-an-invalid-patch-separator-test
+++ a/scripts/checkpatch.pl
@@ -3031,6 +3031,16 @@ sub process {
 			}
 		}
 
+# Check for invalid patch separator
+		if ($in_commit_log &&
+		    $line =~ /^---.+/) {
+			if (ERROR("BAD_COMMIT_SEPARATOR",
+				  "Invalid commit separator - some tools may have problems applying this\n" . $herecurr) &&
+			    $fix) {
+				$fixed[$fixlinenr] =~ s/-/=/g;
+			}
+		}
+
 # Check for patch separator
 		if ($line =~ /^---$/) {
 			$has_patch_separator = 1;
_

Patches currently in -mm which might be from joe@perches.com are



                 reply	other threads:[~2026-02-01  0:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260201001641.61ADAC4CEF1@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=irogers@google.com \
    --cc=joe@perches.com \
    --cc=lukas.bulwahn@gmail.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=visitorckw@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.