From mboxrd@z Thu Jan 1 00:00:00 1970 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 89CDA3A6EF9 for ; Mon, 13 Apr 2026 08:24:59 +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=1776068702; cv=none; b=KMM+EilNP/ezgfc/sI84Gv2pfKb6764n3ndb8EcePw0Uz5xvGN/pcACcsemFtx9EB7/OMgS1fb+I6PzKK178puOHRdIirjZKK+roFCp65ztKZxRJK9Ufqq0vDRr1OH816KHLqsoY1lvmG7iNPvZDVTyUJp5zpa7qjWzBHd64UKw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776068702; c=relaxed/simple; bh=azN5orO67U7Y7qGxWZpX/x15pm1zXMhhpspdnC4+gvM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rk4Vk8C/rsjDX4SoPl4GzR3XPwxJqfZ9D98EUwtH3FhNHlrYU5hKT4yf9Su0RUQqXDCYGl4Wqp+Y1RDR0kzyu+th1jSa/TEcBHNnZ55fr5gmo2tCbwv9nqvmnw46k+Gg6hQt6xzL912YDLPxgn6Jyt4kFhRuuRAlsZ9L+/7DOGM= 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=iyb67E6m; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=VQehBhWd; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=iyb67E6m; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=VQehBhWd; 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="iyb67E6m"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="VQehBhWd"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="iyb67E6m"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="VQehBhWd" 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 5FA9A6A88F; Mon, 13 Apr 2026 08:24:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1776068697; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pLrqJhukpOuJogWxLN+paI62EEaBEblxqTequPlGHWQ=; b=iyb67E6mqFidcod6fnY7hsV7dW7qQrfpn12yu3+uzze4FsuE+cwNgfmoLk8FjgHbDguVwX /Mev4Nz1+i4j/7pNFyp4pYeu5fnBWPzxwAsizYXIBEKvlM59FZ6HdE3/LW4i3BMi8mMdZz Fe8lc2RqtKcIxxdGSVjBuEWEXdAjVSU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1776068697; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pLrqJhukpOuJogWxLN+paI62EEaBEblxqTequPlGHWQ=; b=VQehBhWdK594NJcnrcfRUxQ10FuB/i4/DCFSOVyE03X+pCQm/YF0FW8nnGGTXjTR5ZPoSM Px5QxHpHqLOjyTCQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1776068697; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pLrqJhukpOuJogWxLN+paI62EEaBEblxqTequPlGHWQ=; b=iyb67E6mqFidcod6fnY7hsV7dW7qQrfpn12yu3+uzze4FsuE+cwNgfmoLk8FjgHbDguVwX /Mev4Nz1+i4j/7pNFyp4pYeu5fnBWPzxwAsizYXIBEKvlM59FZ6HdE3/LW4i3BMi8mMdZz Fe8lc2RqtKcIxxdGSVjBuEWEXdAjVSU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1776068697; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pLrqJhukpOuJogWxLN+paI62EEaBEblxqTequPlGHWQ=; b=VQehBhWdK594NJcnrcfRUxQ10FuB/i4/DCFSOVyE03X+pCQm/YF0FW8nnGGTXjTR5ZPoSM Px5QxHpHqLOjyTCQ== 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 556FA4ADB6; Mon, 13 Apr 2026 08:24:56 +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 ZJ2aDlio3GkPDAAAD6G6ig (envelope-from ); Mon, 13 Apr 2026 08:24:56 +0000 Date: Mon, 13 Apr 2026 10:24:49 +0200 From: Petr Vorel To: Simon Glass Cc: linux-kernel@vger.kernel.org, Joe Perches , Rob Herring , Thomas Gleixner , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , Kory Maincent , Tom Rini , Kuan-Wei Chiu Subject: Re: [PATCH v3 2/2] checkpatch: Add option to not force /* */ for SPDX Message-ID: <20260413082449.GB117516@pevik> Reply-To: Petr Vorel References: <20260408120603.54351-1-pvorel@suse.cz> <20260408120603.54351-2-pvorel@suse.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Score: -2.00 X-Spam-Level: X-Spamd-Result: default: False [-2.00 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; HAS_REPLYTO(0.30)[pvorel@suse.cz]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; TAGGED_RCPT(0.00)[]; RCPT_COUNT_SEVEN(0.00)[11]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,perches.com,kernel.org,linutronix.de,canonical.com,gmail.com,bootlin.com,konsulko.com]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[checkpatch.pl:url,suse.cz:replyto,suse.cz:email,imap1.dmz-prg2.suse.org:helo]; RCVD_COUNT_TWO(0.00)[2]; REPLYTO_EQ_FROM(0.00)[] X-Spam-Flag: NO > Hi Petr, > On Wed, 8 Apr 2026 at 06:06, Petr Vorel wrote: > > 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 > Is the help text swapped? To my mind /* */ is C-style. +1, thanks for catching this. > The option name is quite generic for something that only controls SPDX > comment style - how about --spdx-cxx-comments ? Good point, I'll change it in v4. Kind regards, Petr > Regards, > Simon