[RFC PATCH] checkpatch: Discourage use with --f/--file outside of drivers/staging ?

From: Joe Perches
Date: Mon Jul 23 2018 - 17:28:06 EST


Perhaps some patch like this could help reduce the
number of ill-considered checkpatch submissions
for files outside of drivers/staging/

Concept and message wordsmithing appreciated...
---
scripts/checkpatch.pl | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 34e4683de7a3..1a93421d5b1d 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2483,6 +2483,10 @@ sub process {
WARN("OBSOLETE",
"$realfile is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please.\n");
}
+ if ($file && $filename !~ m@^drivers/staging/@) {
+ WARN("CHECKPATCH_FILE",
+ "Using -f/--file with '$realfile' may not be appropriate.\n");
+ }
if ($realfile =~ m@^(?:drivers/net/|net/|drivers/staging/)@) {
$check = 1;
} else {