[PATCH] checkpatch: MAINTAINERS: warn on missing paths

From: Eugene Mavick

Date: Sun Jul 12 2026 - 04:15:28 EST


Warn when F: or X: entries point to nonexistent files or patterns.
There have been instances of typos in file entries in the past, and this
patch helps prevents that.

Signed-off-by: Eugene Mavick <m@xxxxxxxxxx>
---
scripts/checkpatch.pl | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 0492d6afc9a1..e82e330ea460 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3750,6 +3750,15 @@ sub process {
}
}
}
+# check MAINTAINERS file entry for file existence
+ if ($rawline =~ /^\+[FX]:\s*+(.*)/) {
+ my $entry = $1;
+ my @matches = glob($entry);
+ if (!@matches) {
+ WARN("MAINTAINERS_FILE_MISSING",
+ "MAINTAINERS file entry references nonexistent file: '$entry'\n" . $herecurr);
+ }
+ }
}

# check for DT compatible documentation

---
base-commit: 979c294509f9248fe1e7c358d582fb37dd5ca12d
change-id: 20260712-chkpatch-file-entries-90ae03915cde

Best regards,
--
Eugene Mavick <m@xxxxxxxxxx>