]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
checkpatch: add option to not force /* */ for SPDX
authorPetr Vorel <pvorel@suse.cz>
Tue, 21 Apr 2026 21:14:07 +0000 (23:14 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 May 2026 04:24:39 +0000 (21:24 -0700)
commitb8979a02f9c56d489e27690981d2aa29a3e79542
tree4edda7989a4e9740cc495e8a8cb855cbcfe29417
parent2ddfdfe1ad31ba5be5a1c3b4b2b950cf6b6d7c35
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>
Documentation/dev-tools/checkpatch.rst
scripts/checkpatch.pl