From mboxrd@z Thu Jan 1 00:00:00 1970 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: 8bit 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 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 =~ m{\b($Ident)}g) { -- 2.54.0