Skip to contentSkip to conversation

scripts/checkpatch.pl: Adjust the top_of_kernel_tree check for kvm-unit-tests

PATCH In review Thomas Huth 2 participants 3 messages Jul 24, 2025 – Sep 8, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/checkpatch.pl: Adjust the top_of_kernel_tree check for kvm-unit-tests

From: Thomas Huth <[email protected]>

The copy of checkpatch.pl that we currently have in the kvm-unit-tests repository refuses to work without the --no-tree switch, since it looks for some kernel-related files to determine the top directory. Adjust this list of files for the kvm-unit-tests repository to make it work.

---
 scripts/checkpatch.pl | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
scripts/checkpatch.pl +2 -3
index acef47b7..e858261c 100755
@@ -1382,9 +1382,8 @@ sub top_of_kernel_tree {
 	my ($root) = @_;
 
 	my @tree_check = (
-		"COPYING", "CREDITS", "Kbuild", "MAINTAINERS", "Makefile",
-		"README", "Documentation", "arch", "include", "drivers",
-		"fs", "init", "ipc", "kernel", "lib", "scripts",
+		"COPYRIGHT", "LICENSE", "MAINTAINERS", "Makefile",
+		"README.md", "docs", "lib", "scripts",
 	);
 
 	foreach my $check (@tree_check) {
Signature · 1 line
2.50.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · Thomas Huth

From: Thomas Huth <[email protected]>

The copy of checkpatch.pl that we currently have in the kvm-unit-tests repository refuses to work without the --no-tree switch, since it looks for some kernel-related files to determine the top directory. Adjust this list of files for the kvm-unit-tests repository to make it work.

---
 scripts/checkpatch.pl | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
scripts/checkpatch.pl +2 -3
index acef47b7..e858261c 100755
@@ -1382,9 +1382,8 @@ sub top_of_kernel_tree {
 	my ($root) = @_;
 
 	my @tree_check = (
-		"COPYING", "CREDITS", "Kbuild", "MAINTAINERS", "Makefile",
-		"README", "Documentation", "arch", "include", "drivers",
-		"fs", "init", "ipc", "kernel", "lib", "scripts",
+		"COPYRIGHT", "LICENSE", "MAINTAINERS", "Makefile",
+		"README.md", "docs", "lib", "scripts",
 	);
 
 	foreach my $check (@tree_check) {
Signature · 1 line
2.50.1
#2 lore raw
In reply to Thomas Huth
Quoted 31 lines · Thomas Huth

From: Thomas Huth <[email protected]>

The copy of checkpatch.pl that we currently have in the kvm-unit-tests repository refuses to work without the --no-tree switch, since it looks for some kernel-related files to determine the top directory. Adjust this list of files for the kvm-unit-tests repository to make it work.

---
 scripts/checkpatch.pl | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
scripts/checkpatch.pl +2 -3
index acef47b7..e858261c 100755
@@ -1382,9 +1382,8 @@ sub top_of_kernel_tree {
 	my ($root) = @_;
 
 	my @tree_check = (
-		"COPYING", "CREDITS", "Kbuild", "MAINTAINERS", "Makefile",
-		"README", "Documentation", "arch", "include", "drivers",
-		"fs", "init", "ipc", "kernel", "lib", "scripts",
+		"COPYRIGHT", "LICENSE", "MAINTAINERS", "Makefile",
+		"README.md", "docs", "lib", "scripts",
 	);
 
 	foreach my $check (@tree_check) {
Signature · 1 line
2.50.1

Merged.

Thanks,
drew