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 9FED237C0E3 for ; Tue, 12 May 2026 18:21:18 +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=1778610080; cv=none; b=GSTkZSc3v2pBmEbdE5DHaI69CUmWATQRYEdMIrt32VuQpq0ecLtbUNhb2w2NVhsEFaia3F4JVd0iW5UmyNDs7YEy1gRZmS5uBfcN0FbyPfLkbf4LQownxVycI8ZMNXO6EO6UvULsEzpOxMlPGGKftpXHYQg+mwC9I0RDdOundbw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778610080; c=relaxed/simple; bh=8Kse1g5WJ0ZQBk6ndeynrk89JIfX5CYVHbrjqy9ujQ8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Pkat/BgqTLvEIcg3KAg6f/c3iemJTtqCQ3/Sg9k7vd+0qZpTRmJD1X1EbqHk1tvv2kYg76ushpJq34mc98YJo196pxyR9+XSUwW/FdhabO/ZEbAmrtYgz8I6rZC2U0JhAa+iDmCcrSIOiTxYqL+tDEQVbVss/gYLxVCbKpwP6TI= 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=A3u3CXtL; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=EcaiN7OX; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=m2qSpcmZ; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=ndZxfxe3; 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="A3u3CXtL"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="EcaiN7OX"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="m2qSpcmZ"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="ndZxfxe3" 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 1A15A7617A; Tue, 12 May 2026 18:21:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1778610071; 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=UiuRMaE5Oy1+4JkgcHaZ5H2ds9cPbRiii+qPi4mh21k=; b=A3u3CXtLkjfE33yVV+MzfbFJpIeteBRLbfZRXGZrav3kjZWVFDxIpL5eQp13LrQbOCsfF7 yf9pxWSFXMGuiCKioTphsIAF42rh2ZgkbbBsL/zsEitUTbiWJO9YCDQmKOaWE3yCXJaxF/ OFqMSi+rpCNxvVZkaqLgXl2NNM972nw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1778610071; 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=UiuRMaE5Oy1+4JkgcHaZ5H2ds9cPbRiii+qPi4mh21k=; b=EcaiN7OXjla2gu1Odmo8r5m7bh1vtFw0R3azHONoaDVql9R/+Vxwh1UchYJgnlHuUK6G/P CH6WGBwhkWdCsjDA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=m2qSpcmZ; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=ndZxfxe3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1778610067; 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=UiuRMaE5Oy1+4JkgcHaZ5H2ds9cPbRiii+qPi4mh21k=; b=m2qSpcmZU4VdRrcMSGCW/1pIS1eFxPjazXvOo/zZQ+5ZMAXKbJ/0i1MeI9GKBi3WzwZ/jL lx8YPkU4jD7VC4FqAq9jQjDpHvyIn/ZwADfKJgrgzDMS9iGS68v08Lp+CWKDoDSvAxitzA 3Mw0NnxxAZZNmdAhjxMbgNWceZpXVtI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1778610067; 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=UiuRMaE5Oy1+4JkgcHaZ5H2ds9cPbRiii+qPi4mh21k=; b=ndZxfxe3yaQ3s8w6HhyPaCxA1YxUFFCq18MdfRg2QfDIFuffDs7Q2UfdvUd7xngJzXWamO w3Jhi7N4DW+7zwDQ== 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 92A51593A9; Tue, 12 May 2026 18:21:05 +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 kheEHpFvA2rseQAAD6G6ig (envelope-from ); Tue, 12 May 2026 18:21:05 +0000 Date: Tue, 12 May 2026 20:20:54 +0200 From: Petr Vorel To: Joe Perches Cc: linux-kernel@vger.kernel.org, Simon Glass , Dwaipayan Ray , Lukas Bulwahn , Przemek Kitszel Subject: Re: [PATCH 1/1] checkpatch: Ignore format macros Message-ID: <20260512182054.GA56512@pevik> Reply-To: Petr Vorel References: <20260511121237.11030-1-pvorel@suse.cz> <48d091b644b205b1dad326a855d5b766b042c120.camel@perches.com> <20260511215757.GB20488@pevik> 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-Level: X-Rspamd-Action: no action X-Spamd-Result: default: False [-2.21 / 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]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; ARC_NA(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; URIBL_BLOCKED(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.cz:dkim,suse.cz:replyto,checkpatch.pl:url]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FUZZY_RATELIMITED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; FREEMAIL_CC(0.00)[vger.kernel.org,chromium.org,gmail.com,intel.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:dkim,suse.cz:replyto,checkpatch.pl:url,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from,2a07:de40:b281:106:10:150:64:167:received]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[]; DKIM_TRACE(0.00)[suse.cz:+]; MISSING_XM_UA(0.00)[]; REPLYTO_EQ_FROM(0.00)[] X-Rspamd-Queue-Id: 1A15A7617A X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Score: -2.21 Hi Joe, all, > On Mon, 2026-05-11 at 23:57 +0200, Petr Vorel wrote: > > On Mon, 2026-05-11 at 14:12 +0200, Petr Vorel wrote: > > > > 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: > > > Nack. This is userspace only and should be tested as such. > > Thanks for info. > > Yes, warning is correct for kernel space code. Do I understand correctly that > > false positives are ok for user space code in the Linux kernel tree? > > Or is it just because checkpatch.pl has no idea which sources are for user > > space? > Hello Petr. > I suppose another check could be added. > There is function 'is_userspace' available. Thanks for pointing out is_userspace() (quite new, from v6.18-rc1, not even in u-boot vendored checkpatch.pl). > I don't know if userspace cares at all about camelcase anyway. I'd say while there are some differences in kernel and user space code, code style should be mostly the same => userspace should care. Doc [1] does not mention anything specific about userspace either. Therefore I'd prefer to send v2 with this change (to v1): - $var !~ /^(?:PRI|SCN)[dioux][A-Z0-9]+$/ && + (is_userspace($realfile) && $var !~ /^(?:PRI|SCN)[dioux][A-Z0-9]+$/) && Other thing, because we vendored checkpatch.pl in LTP which has only userspace code, I'll have to modify is_userspace() to return always 1. It'd be great if you acked patch to allow always return 1 based on certain variable (e.g. CHECKPATCH_FORCE_USERSPACE=1) or even getopt switch (e.g. --userspace). But I understand if you don't ack it (minimise number of patches on vendored checkpatch.pl makes updating it easier and there are other user space projects which suggest to use checkpatch.pl e.g. btrfs-progs, but there is a boundary what is meaningful to upstream). Kind regards, Petr [1] https://www.kernel.org/doc/html/latest/process/coding-style.html#naming