summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7057ee01178b..8f972e746990 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4894,6 +4894,13 @@ sub process {
"Avoid line continuations in quoted strings\n" . $herecurr);
}
+# sys_open/read/write/close are not allowed in the kernel
+ if ($line =~ /\b(sys_(?:open|read|write|close))\b/) {
+ ERROR("FILE_OPS",
+ "$1 is inappropriate in kernel code.\n" .
+ $herecurr);
+ }
+
# warn about #if 0
if ($line =~ /^.\s*\#\s*if\s+0\b/) {
WARN("IF_0",