+ checkpatch-skip-camelcase-cache-for-no-tree-without-root.patch added to mm-nonmm-unstable branch
Andrew Morton <[email protected]>
| Newsgroups | org.kernel.vger.mm-commits |
|---|---|
| Message-ID | <[email protected]> |
The patch titled
Subject: checkpatch: skip CamelCase cache for --no-tree without root
has been added to the -mm mm-nonmm-unstable branch. Its filename is
checkpatch-skip-camelcase-cache-for-no-tree-without-root.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/checkpatch-skip-camelcase-cache-for-no-tree-without-root.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Petr Vorel <[email protected]>
Subject: checkpatch: skip CamelCase cache for --no-tree without root
Date: Mon, 10 Aug 2026 18:11:59 +0200
Running outside tree (--no-tree) without git root (--root DIR) is not
doable because we have no include/ directory which could be cached. But
3445686af721 expected that we are always in Linux tree (w/a git). But
--no-tree does not require --root. Therefore skip whole caching in that
case.
This fixes perl and find errors when running checkpatch.pl *with*
--no-tree --strict and *without* --root:
No structs that should be const will be found - file 'scripts/const_structs.checkpatch': No such file or directory
Use of uninitialized value $root in concatenation (.) or string at scripts/checkpatch.pl line 1213.
find: `/include': No such file or directory
Link: https://lore.kernel.org/[email protected]
Fixes: 3445686af721 ("checkpatch: ignore existing CamelCase uses from include/...")
Signed-off-by: Petr Vorel <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Dwaipayan Ray <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Lukas Bulwahn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
scripts/checkpatch.pl | 2 ++
1 file changed, 2 insertions(+)
--- a/scripts/checkpatch.pl~checkpatch-skip-camelcase-cache-for-no-tree-without-root
+++ a/scripts/checkpatch.pl
@@ -1206,6 +1206,8 @@ sub seed_camelcase_includes {
my $git_last_include_commit = `${git_command} log --no-merges --pretty=format:"%h%n" -1 -- include`;
chomp $git_last_include_commit;
$camelcase_cache = ".checkpatch-camelcase.git.$git_last_include_commit";
+ } elsif (not defined $root) {
+ return;
} else {
my $last_mod_date = 0;
$files = `find $root/include -name "*.h"`;
_
Patches currently in -mm which might be from [email protected] are
maintainers-add-irc-and-patchwork-for-ltp.patch
checkpatch-skip-camelcase-cache-for-no-tree-without-root.patch