From nobody Mon May 25 00:08:42 2026 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 B295B3ACA60 for ; Wed, 20 May 2026 10:08:34 +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=1779271716; cv=none; b=ModuKUhN6tyaZp7/wLahNoqF7qYzxrOYxAwMEYNngDbUSdpbgisNUYHsxrmC+e/MOmponEXcDxpx9QYJDbJkOe/cwHxUGUpfVuHbOslzl5MC+xwUJCqhDUHq6e8Qvj+LtDtsfiaN1MBonqAckq0e2WQA9afdWuhjEIdCucjVGPU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779271716; c=relaxed/simple; bh=1Q7ico9J0SCfW49PwVmVo8vxlG+LE0zJoVSkH2hrFso=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jlnxoJ4L9tnsami+wRmvbJXn9AdL7EF0hbnORrxZSEWXaO5MGpmSPx4nxHiw2jXlsXT7SYas1eOeGXngIleRX9jzpvg4nPHmsjponTzqeEdRwVvU17Kp6GtnRVhFIbwvoFKkoqeDO5NOBOxQonAxiEJlLcXHU3Ub2AKWG0pfmfY= 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=XvKu1Nuy; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=Mi8THITN; 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="XvKu1Nuy"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="Mi8THITN" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104: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 0EC876B4F1; Wed, 20 May 2026 10:08:33 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1779271713; 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=85LES76OiG9z2yFEOZBNlbNJsh7uyjUzTNZCW8FLEKo=; b=XvKu1NuyZHf6C/SsX/r3MN9nodAMNapSN3ukYZpNhVjZdOjkTaGJXgCYK5l7T9dg8MMThg lOJ+Imz6N9JgKGnYFu1vGPDnBG+YlSJXdWjtCCU5nm2wkvxmgqnLPgk+ZhNTBn2C70maFk sMECY4uSqvfG3xWqXmr6KFlnUZz96W0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1779271713; 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=85LES76OiG9z2yFEOZBNlbNJsh7uyjUzTNZCW8FLEKo=; b=Mi8THITNloe/94snZMvghGEFWrl4B0Gx8ncfvboFoWap/5QNOIdJIdVtO3dYCWq9TZWmRJ HUarMDLFFeBcrxCw== 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 E98A1593AB; Wed, 20 May 2026 10:08:32 +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 uIp6OCCIDWq8ewAAD6G6ig (envelope-from ); Wed, 20 May 2026 10:08:32 +0000 From: Petr Vorel To: linux-kernel@vger.kernel.org Cc: Petr Vorel , Joe Perches , Simon Glass , Dwaipayan Ray , Lukas Bulwahn Subject: [PATCH v3 1/3] checkpatch: Add more user space directories to is_userspace() Date: Wed, 20 May 2026 12:08:27 +0200 Message-ID: <20260520100829.93791-2-pvorel@suse.cz> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520100829.93791-1-pvorel@suse.cz> References: <20260520100829.93791-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: quoted-printable X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[] X-Rspamd-Queue-Id: 0EC876B4F1 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spam-Score: -4.00 X-Spam-Level: X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Rspamd-Action: no action Content-Type: text/plain; charset="utf-8" arch/*/tools/ and arch/*/boot/tools/ are directories containing user space tools. This helps not only to strscpy checks but also to CamelCase checks in the next commit to be more precise. Follow-up: 99b70ece33d8 ("checkpatch: suppress strscpy warnings for userspa= ce tools") Signed-off-by: Petr Vorel --- New in v3. scripts/checkpatch.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 939d2b9ecebd..663064f32dae 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2669,7 +2669,10 @@ sub exclude_global_initialisers { =20 sub is_userspace { my ($realfile) =3D @_; - return ($realfile =3D~ m@^tools/@ || $realfile =3D~ m@^scripts/@); + return ($realfile =3D~ m@^tools/@ || + $realfile =3D~ m@^scripts/@ || + $realfile =3D~ m@^arch/[^/]+/tools/@ || + $realfile =3D~ m@^arch/[^/]+/boot/tools/@); } =20 sub process { --=20 2.54.0 From nobody Mon May 25 00:08:42 2026 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (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 73DCD3A382A for ; Wed, 20 May 2026 10:08:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779271722; cv=none; b=rBLru/XvjdozlO6EEhnnHnpMrCJfP4lmUqBhMlpV2bEFCXcVYMQoVIy73xvmgxAMfiZMtzNozjM7jLUGoxJ86Sv8B/PT3e1HdM4NfJrZI/mN9kLY4srviAb9hSCu4vD0rr9IEBcFFSvqXe58yUhmGKxdFRMahyc2O1SAJbOYxUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779271722; c=relaxed/simple; bh=pafuYUjjE1KCL0Vcyjej4/LITfvTqKw31vh0+50087s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VFA1fS/m4+6t93ga7Ycy0ZzshiPPDIOIxCC+iwQHGqMEeBH7VSugWBXGcnkQD8MDITmQ4hYNh/aR9x57xG3dfOm6Gg8OF4lpSNhSXwRwPsH98owzKSlAdXf6T0Hm3ZiCiQalGNL59T3VEOJRxj7IawUutq8cNRHFXtD8RoyZtrg= 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=Rgfzct9G; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=KSZLLP72; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=Rgfzct9G; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=KSZLLP72; arc=none smtp.client-ip=195.135.223.131 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="Rgfzct9G"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="KSZLLP72"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="Rgfzct9G"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="KSZLLP72" 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-out2.suse.de (Postfix) with ESMTPS id 23BD567972; Wed, 20 May 2026 10:08:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1779271713; 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=xp0PwARMrWVQ7wBWKwlL3GRLCDbBhuE6Y16FSlp4Gu8=; b=Rgfzct9GNcbFTL4Rl46rOQCMm1Nm/lurEyghgXBdub9WFPK6QPFnlJ559KPfVCyC1ZIRdG yMj39kJqLyae/9mRO0KSgVCvN93hXXnrykxXYHrZVXzu79cB46zS4DbyeaHiquJojpHpNz xDee0MROh0oJLaQN4ZDqV3xI+2eHR3c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1779271713; 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=xp0PwARMrWVQ7wBWKwlL3GRLCDbBhuE6Y16FSlp4Gu8=; b=KSZLLP72UiVlQYfalt5VyHPVDlq6dvH81V/Auq00ioxyWSjssie6zXslK2GrxTxkXbT5sw Qxosv7slRMEQjLBQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1779271713; 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=xp0PwARMrWVQ7wBWKwlL3GRLCDbBhuE6Y16FSlp4Gu8=; b=Rgfzct9GNcbFTL4Rl46rOQCMm1Nm/lurEyghgXBdub9WFPK6QPFnlJ559KPfVCyC1ZIRdG yMj39kJqLyae/9mRO0KSgVCvN93hXXnrykxXYHrZVXzu79cB46zS4DbyeaHiquJojpHpNz xDee0MROh0oJLaQN4ZDqV3xI+2eHR3c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1779271713; 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=xp0PwARMrWVQ7wBWKwlL3GRLCDbBhuE6Y16FSlp4Gu8=; b=KSZLLP72UiVlQYfalt5VyHPVDlq6dvH81V/Auq00ioxyWSjssie6zXslK2GrxTxkXbT5sw Qxosv7slRMEQjLBQ== 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 0BA4A593AC; Wed, 20 May 2026 10:08:33 +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 YC1SAiGIDWq8ewAAD6G6ig (envelope-from ); Wed, 20 May 2026 10:08:33 +0000 From: Petr Vorel To: linux-kernel@vger.kernel.org Cc: Petr Vorel , Joe Perches , Simon Glass , Dwaipayan Ray , Lukas Bulwahn Subject: [PATCH v3 2/3] checkpatch: Ignore format macros for userspace tools Date: Wed, 20 May 2026 12:08:28 +0200 Message-ID: <20260520100829.93791-3-pvorel@suse.cz> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520100829.93791-1-pvorel@suse.cz> References: <20260520100829.93791-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: quoted-printable X-Spam-Level: X-Spamd-Result: default: False [-5.30 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[99.99%]; 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)[-1.000]; 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)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; TAGGED_RCPT(0.00)[]; FREEMAIL_CC(0.00)[suse.cz,perches.com,chromium.org,gmail.com]; RCVD_TLS_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[sashiko.dev:url,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)[]; RCPT_COUNT_FIVE(0.00)[6]; FREEMAIL_ENVRCPT(0.00)[gmail.com] X-Spam-Flag: NO X-Spam-Score: -5.30 Content-Type: text/plain; charset="utf-8" Constants from are used only in userspace tools, they are from ISO C99, let's don't report it: arch/mips/boot/tools/relocs.c:572: CHECK: Avoid CamelCase: arch/s390/tools/relocs.c:52: CHECK: Avoid CamelCase: tools/testing/selftests/mm/vm_util.c:244: CHECK: Avoid CamelCase: Signed-off-by: Petr Vorel --- Changes v2->v3: * Fix unintentional disablement of CamelCase warnings on non-userspace sources (sashiko). Link to v2: https://lore.kernel.org/lkml/20260519162004.81665-1-pvorel@suse.cz/ https://sashiko.dev/#/patchset/20260519162004.81665-1-pvorel%40suse.cz scripts/checkpatch.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 663064f32dae..60da43b00d55 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5945,6 +5945,8 @@ sub process { #Ignore SI style variants like nS, mV and dB #(ie: max_uV, regulator_min_uA_show, RANGE_mA_VALUE) $var !~ /^(?:[a-z0-9_]*|[A-Z0-9_]*)?_?[a-z][A-Z](?:_[a-z0-9_]+|_[A-= Z0-9_]+)?$/ && +#Ignore format macros (e.g. PRIu64, SCNu64) + (is_userspace($realfile) ? $var !~ /^(?:PRI|SCN)[dioux][A-Z0-9]+$/ = : 1) && #Ignore some three character SI units explicitly, like MiB and KHz $var !~ /^(?:[a-z_]*?)_?(?:[KMGT]iB|[KMGT]?Hz)(?:_[a-z_]+)?$/) { while ($var =3D~ m{\b($Ident)}g) { --=20 2.54.0 From nobody Mon May 25 00:08:42 2026 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (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 A3A4D62809 for ; Wed, 20 May 2026 10:08:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779271727; cv=none; b=bY5yktkOyW2Ch2VKC48VYRQx9qNj8J6Igo70dcro7U4sBwzACk/xQ1xBUsee7gyhv1fpxDKmUqlKVSpgCV/bNldzS33pROXL+nmYGZL3WDiIu5l/ZecCg1OjqmlhizW0SUkfqlqpgE1FcVU7vtjJgJDLLIq9iTsIMPb+VRBCTn0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779271727; c=relaxed/simple; bh=csOe+lZ/I7NfLu8LSUXWgIMMfMZo5RxFa56VlZsh69E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j+DebMqlsl2IRucn9nS1KUYxnZfHo0lp8MLMWyKpwpUPwuMM3x61QuF5ArhYU9Yu5S+B2c0d5jIBdRaHgExDU24zHstIM9TEJsXKJ5D0aW199nQPex3zo5BEcsA2f18kszLcFRTgi7uH+icokB1UO7Y22Kcz2ix5qnSQelm7y8o= 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; arc=none smtp.client-ip=195.135.223.131 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 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104: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-out2.suse.de (Postfix) with ESMTPS id 3A70E67A9A; Wed, 20 May 2026 10:08:33 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none 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 239A1593AA; Wed, 20 May 2026 10:08:33 +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 SIsfCCGIDWq8ewAAD6G6ig (envelope-from ); Wed, 20 May 2026 10:08:33 +0000 From: Petr Vorel To: linux-kernel@vger.kernel.org Cc: Petr Vorel , Joe Perches , Simon Glass , Dwaipayan Ray , Lukas Bulwahn Subject: [PATCH v3 3/3] checkpatch: Add new option to force userspace Date: Wed, 20 May 2026 12:08:29 +0200 Message-ID: <20260520100829.93791-4-pvorel@suse.cz> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260520100829.93791-1-pvorel@suse.cz> References: <20260520100829.93791-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: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[] X-Rspamd-Queue-Id: 3A70E67A9A X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spam-Score: -4.00 X-Spam-Level: X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Rspamd-Action: no action Content-Type: text/plain; charset="utf-8" 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 =3D 'CHECKPATCH_CONFIG_DIR'; my $max_line_length =3D 100; my $ignore_perl_version =3D 0; my $spdx_cxx_comments =3D 0; +my $userspace =3D 0; my $minimum_perl_version =3D 5.10.0; my $min_conf_desc_length =3D 4; my $spelling_file =3D "$D/spelling.txt"; @@ -143,6 +144,7 @@ Options: (required by old toolchains), allow also C++ comments (//). NOTE: it should *not* be used for Linux mainl= ine. + --userspace Force rules specific for userspace. --codespell Use the codespell dictionary for spelling/typ= os (default:$codespellfile) --codespellfile Use this codespell dictionary @@ -358,6 +360,7 @@ GetOptions( 'codespell!' =3D> \$codespell, 'codespellfile=3Ds' =3D> \$user_codespellfile, 'typedefsfile=3Ds' =3D> \$typedefsfile, + 'userspace' =3D> \$userspace, 'color=3Ds' =3D> \$color, 'no-color' =3D> \$color, #keep old behaviors of -nocolor 'nocolor' =3D> \$color, #keep old behaviors of -nocolor @@ -2669,7 +2672,8 @@ sub exclude_global_initialisers { =20 sub is_userspace { my ($realfile) =3D @_; - return ($realfile =3D~ m@^tools/@ || + return ($userspace || + $realfile =3D~ m@^tools/@ || $realfile =3D~ m@^scripts/@ || $realfile =3D~ m@^arch/[^/]+/tools/@ || $realfile =3D~ m@^arch/[^/]+/boot/tools/@); --=20 2.54.0