Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C133439DBE1 for ; Wed, 8 Apr 2026 12:06:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775649977; cv=none; b=so7D2PIeJYa+l/9npmVjoE+ihQDCr81CCrzn3aEu4faF0snYbxcM7sM+C+7cc5WZpsYBs+QKaZTzXND9TqW2SlYtqjIUeAGqugds9atozR5pcqhDhVbi1/Rr1+w422cV/qkHzsPtWMSFF+sTueamBExKX2il3GbYgsV5psTITrg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775649977; c=relaxed/simple; bh=vyrO+hCu+jQt4lnSsXWZjx/0av3QeByhPz9GCaJgyek=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MDVawCQV3wCbzoPm6nyJ4Fe8Q8ZNmLn/Ts8rDvp3OrO2ku1xvTuGbQoUAKJOJHvZAOveyzBToWQE4/eZPVfjEx8hf4xu8FRA5gXMJ1OEWozJEzwNTQf0STxHBTxGqmkPTgnsk3LGubMc40B76yubCLaRFRonzIID14WZeXEMXtg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=DR4f7Hxh; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=LNeUax2k; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=DR4f7Hxh; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=LNeUax2k; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="DR4f7Hxh"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="LNeUax2k"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="DR4f7Hxh"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="LNeUax2k" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B16D24E9A9; Wed, 8 Apr 2026 12:06:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1775649972; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OzrXm6BFHuDJyQsQdb/63DQ82jgMTbLIk24OFUjk0Ak=; b=DR4f7HxhtsP4veToMELmesodErCZee8104Ltul6L493mR6sd1nxSOp3b/hR6FOtNOy0PV0 o7chCZX6USsRQMnCjcBJeglxgGLKTVY/pUtFJq73NCSnKxICnI/lkcLY3+3LCJYe8vza5L 5WzFvcIRs37b70y5hUdaBWV6pctteSw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1775649972; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OzrXm6BFHuDJyQsQdb/63DQ82jgMTbLIk24OFUjk0Ak=; b=LNeUax2kj64vQw89Jfu/xL8+Ck4wGc2LzaXFb75yj4AT2d5H7ibZgm02SJznLfkCJ4L1l0 u48U6A1fk/2NqBDA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1775649972; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OzrXm6BFHuDJyQsQdb/63DQ82jgMTbLIk24OFUjk0Ak=; b=DR4f7HxhtsP4veToMELmesodErCZee8104Ltul6L493mR6sd1nxSOp3b/hR6FOtNOy0PV0 o7chCZX6USsRQMnCjcBJeglxgGLKTVY/pUtFJq73NCSnKxICnI/lkcLY3+3LCJYe8vza5L 5WzFvcIRs37b70y5hUdaBWV6pctteSw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1775649972; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OzrXm6BFHuDJyQsQdb/63DQ82jgMTbLIk24OFUjk0Ak=; b=LNeUax2kj64vQw89Jfu/xL8+Ck4wGc2LzaXFb75yj4AT2d5H7ibZgm02SJznLfkCJ4L1l0 u48U6A1fk/2NqBDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 75DAE4A0B4; Wed, 8 Apr 2026 12:06:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id YDm0G7RE1mkPUQAAD6G6ig (envelope-from ); Wed, 08 Apr 2026 12:06:12 +0000 From: Petr Vorel To: linux-kernel@vger.kernel.org Cc: Petr Vorel , Joe Perches , Simon Glass , Rob Herring , Thomas Gleixner , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , Kory Maincent , Tom Rini , Kuan-Wei Chiu Subject: [PATCH v3 2/2] checkpatch: Add option to not force /* */ for SPDX Date: Wed, 8 Apr 2026 14:06:03 +0200 Message-ID: <20260408120603.54351-2-pvorel@suse.cz> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408120603.54351-1-pvorel@suse.cz> References: <20260408120603.54351-1-pvorel@suse.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -5.30 X-Spam-Level: X-Spamd-Result: default: False [-5.30 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.997]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_TWELVE(0.00)[12]; MIME_TRACE(0.00)[0:+]; TAGGED_RCPT(0.00)[]; FREEMAIL_CC(0.00)[suse.cz,perches.com,chromium.org,kernel.org,linutronix.de,canonical.com,gmail.com,bootlin.com,konsulko.com]; RCVD_TLS_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.cz:mid,suse.cz:email]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com] X-Spam-Flag: NO Add option --ignore-old-toolchain to not force /* */ for SPDX. As documented in aa19a176df95d6, this is required for some old toolchains still have older assembler tools which cannot handle C++ style comments. This allows avoid forcing this for for projects which vendored checkpatch.pl (e.g. LTP or u-boot). Signed-off-by: Petr Vorel --- New in v3. I suppose you will not want to add code which should not be used on mainline. But it would help to not force other projects which vendored checkpatch.pl to neither force /* */ nor carry extra patch. I wonder if this rule is still relevant (are these old toolchains still being used). Kind regards, Petr scripts/checkpatch.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 58f3d5a98204c..ec1e9670a0c1d 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -61,6 +61,7 @@ my $def_configuration_dirs = ".:$ENV{HOME}:.scripts"; my $env_config_dir = 'CHECKPATCH_CONFIG_DIR'; my $max_line_length = 100; my $ignore_perl_version = 0; +my $ignore_old_toolchain = 0; my $minimum_perl_version = 5.10.0; my $min_conf_desc_length = 4; my $spelling_file = "$D/spelling.txt"; @@ -137,6 +138,9 @@ Options: file. It's your fault if there's no backup or git --ignore-perl-version override checking of perl version. expect runtime errors. + --ignore-old-toolchain don't force C++ comments (/* */) for SPDX license + (required by old toolchains). NOTE: it should *not* + be used for Linux mainline. --codespell Use the codespell dictionary for spelling/typos (default:$codespellfile) --codespellfile Use this codespell dictionary @@ -346,6 +350,7 @@ GetOptions( 'fix!' => \$fix, 'fix-inplace!' => \$fix_inplace, 'ignore-perl-version!' => \$ignore_perl_version, + 'ignore-old-toolchain!' => \$ignore_old_toolchain, 'debug=s' => \%debug, 'test-only=s' => \$tst_only, 'codespell!' => \$codespell, @@ -3812,7 +3817,7 @@ sub process { } elsif ($rawline =~ /^\+/) { my $comment = ""; if ($realfile =~ /\.(h|s|S)$/) { - $comment = '/*'; + $comment = $ignore_old_toolchain ? '//' : '/*'; } elsif ($realfile =~ /\.(c|rs|dts|dtsi)$/) { $comment = '//'; } elsif (($checklicenseline == 2) || $realfile =~ /\.(sh|pl|py|awk|tc|yaml)$/) { -- 2.53.0