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 5E244372B59 for ; Wed, 20 May 2026 20:37:32 +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=1779309453; cv=none; b=XehHpFVHKOTpqE8bUsaq9oIoEIoPlU5LeM/ZWUppsJZkefmnmNkIpqwzAjDXk/Jr7XnP46+IfYxNha61B8yY0rATUmhHX7RM5nS/1af03El/Tz8w50csUqBtcKYb4GOdL5vt5Dz+jgY0P6c+bbda5Sdul3ZkCBiCSVW4K+Xv2eg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779309453; c=relaxed/simple; bh=C+e95LnFSjxHWp1pt+wf0yNNfN1qMV8yCRuHZcHSfrI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DNlkl7M0KfdtehHxvlHo1nnwnlrZ2F3mdqfwdzWXqbS5QpVoWNoDWO5cYnTrPOnBB1d65xMJ6rg8VvTL+QNkUaWynF1uOln/7EfPjrvW5pwJJ4naips0gdYGIZbwRR2p4hQQJtOgvjuFbLkv6N93Imir7a7tYxk+NmEpDx9OH0o= 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=whdX7Upb; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=FQ+X3xWO; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=whdX7Upb; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=FQ+X3xWO; 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="whdX7Upb"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="FQ+X3xWO"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="whdX7Upb"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="FQ+X3xWO" 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 898C66AD34; Wed, 20 May 2026 20:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1779309450; 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=tPXhp+sQykpNrD84ZNNgQI01OHG8bgWCzC0oYpHoflU=; b=whdX7UpbkLrob0u9MyIK+wpAsNNFQLfo8cCmIPh6CpqYAAgVc2gymo5xG48Abvf5y0HnY0 Lb8/7u4M0L5lhOGvcLSpdFWdorUQQbaL1OyJmZrtvORPSByDp2yZENqRd+Pg9vRoMHHEMP tapo34iLwEMeuve1Xd/DnaLwK0WfI9Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1779309450; 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=tPXhp+sQykpNrD84ZNNgQI01OHG8bgWCzC0oYpHoflU=; b=FQ+X3xWO2as0CuPSSkX4qP3R4pKw2MmaiK7bOmMnFixgnyqzK/WSivWtgbpM8CzOBCIxoP C5FCU/8cLJO1HMAg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1779309450; 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=tPXhp+sQykpNrD84ZNNgQI01OHG8bgWCzC0oYpHoflU=; b=whdX7UpbkLrob0u9MyIK+wpAsNNFQLfo8cCmIPh6CpqYAAgVc2gymo5xG48Abvf5y0HnY0 Lb8/7u4M0L5lhOGvcLSpdFWdorUQQbaL1OyJmZrtvORPSByDp2yZENqRd+Pg9vRoMHHEMP tapo34iLwEMeuve1Xd/DnaLwK0WfI9Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1779309450; 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=tPXhp+sQykpNrD84ZNNgQI01OHG8bgWCzC0oYpHoflU=; b=FQ+X3xWO2as0CuPSSkX4qP3R4pKw2MmaiK7bOmMnFixgnyqzK/WSivWtgbpM8CzOBCIxoP C5FCU/8cLJO1HMAg== 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 778E2593AA; Wed, 20 May 2026 20:37:30 +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 oqG8HIobDmodVwAAD6G6ig (envelope-from ); Wed, 20 May 2026 20:37:30 +0000 Date: Wed, 20 May 2026 22:37:14 +0200 From: Petr Vorel To: linux-kernel@vger.kernel.org Cc: Joe Perches , Simon Glass , Dwaipayan Ray , Lukas Bulwahn Subject: Re: [PATCH v3 3/3] checkpatch: Add new option to force userspace Message-ID: <20260520203714.GB94543@pevik> Reply-To: Petr Vorel References: <20260520100829.93791-1-pvorel@suse.cz> <20260520100829.93791-4-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: <20260520100829.93791-4-pvorel@suse.cz> X-Spam-Flag: NO X-Spam-Score: -2.00 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]; RCVD_VIA_SMTP_AUTH(0.00)[]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; TAGGED_RCPT(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[perches.com,chromium.org,gmail.com]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[] X-Spam-Level: > Signed-off-by: Petr Vorel > --- > New in v3. > scripts/checkpatch.pl | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 60da43b00d55..205ce64d06bf 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -63,6 +63,7 @@ my $env_config_dir = 'CHECKPATCH_CONFIG_DIR'; > my $max_line_length = 100; > my $ignore_perl_version = 0; > my $spdx_cxx_comments = 0; > +my $userspace = 0; > my $minimum_perl_version = 5.10.0; > my $min_conf_desc_length = 4; > my $spelling_file = "$D/spelling.txt"; > @@ -143,6 +144,7 @@ Options: > (required by old toolchains), allow also C++ > comments (//). > NOTE: it should *not* be used for Linux mainline. > + --userspace Force rules specific for userspace. > --codespell Use the codespell dictionary for spelling/typos > (default:$codespellfile) > --codespellfile Use this codespell dictionary > @@ -358,6 +360,7 @@ GetOptions( > 'codespell!' => \$codespell, > 'codespellfile=s' => \$user_codespellfile, > 'typedefsfile=s' => \$typedefsfile, > + 'userspace' => \$userspace, sashiko suggest to use "!" to allow --no-userspace. I don't see a point in having it because it's off by default, but as most of options without parameters use it, I can add it for consistency. Kind regards, Petr > 'color=s' => \$color, > 'no-color' => \$color, #keep old behaviors of -nocolor > 'nocolor' => \$color, #keep old behaviors of -nocolor > @@ -2669,7 +2672,8 @@ sub exclude_global_initialisers { > sub is_userspace { > my ($realfile) = @_; > - return ($realfile =~ m@^tools/@ || > + return ($userspace || > + $realfile =~ m@^tools/@ || > $realfile =~ m@^scripts/@ || > $realfile =~ m@^arch/[^/]+/tools/@ || > $realfile =~ m@^arch/[^/]+/boot/tools/@);