aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
authorPetr Vorel <pvorel@suse.cz>2026-04-21 23:14:07 +0200
committerAndrew Morton <akpm@linux-foundation.org>2026-05-28 21:24:39 -0700
commitb8979a02f9c56d489e27690981d2aa29a3e79542 (patch)
tree4edda7989a4e9740cc495e8a8cb855cbcfe29417 /Documentation
parent2ddfdfe1ad31ba5be5a1c3b4b2b950cf6b6d7c35 (diff)
downloadlinux-next-history-b8979a02f9c56d489e27690981d2aa29a3e79542.tar.gz
checkpatch: add option to not force /* */ for SPDX
Add option --spdx-cxx-comments to not force C comments (/* */) for SPDX, but allow also C++ comments (//). As documented in aa19a176df95d6, this is required for some old toolchains still have older assembler tools which cannot handle C++ style comments. This avoids forcing this for projects which vendored checkpatch.pl (e.g. LTP or u-boot). Link: https://lore.kernel.org/20260421211408.383972-2-pvorel@suse.cz Signed-off-by: Petr Vorel <pvorel@suse.cz> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Perches <joe@perches.com> Cc: Dwaipayan Ray <dwaipayanray1@gmail.com> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/dev-tools/checkpatch.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst
index 010dfcd615afc..6139a08c34cd8 100644
--- a/Documentation/dev-tools/checkpatch.rst
+++ b/Documentation/dev-tools/checkpatch.rst
@@ -184,6 +184,13 @@ Available options:
Override checking of perl version. Runtime errors may be encountered after
enabling this flag if the perl version does not meet the minimum specified.
+ - --spdx-cxx-comments
+
+ Don't force C comments ``/* */`` for SPDX license (required by old
+ toolchains), allow also C++ comments ``//``.
+
+ NOTE: it should *not* be used for Linux mainline.
+
- --codespell
Use the codespell dictionary for checking spelling errors.