diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 28516587babac8fbc9eb346f0a44b1aba9c39a8e..561f41ef531fd6f3d64ab4a6fcf7e278354f947d 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3396,6 +3396,14 @@ sub process { "Prefer dev_$level(... to dev_printk(KERN_$orig, ...\n" . $herecurr); } +# ENOSYS means "bad syscall nr" and nothing else. This will have a small +# number of false positives, but assembly files are not checked, so at +# least the arch entry code will not trigger this warning. + if ($line =~ /\bENOSYS\b/) { + WARN("ENOSYS", + "ENOSYS means 'invalid syscall nr' and nothing else\n" . $herecurr); + } + # function brace can't be on same line, except for #defines of do while, # or if closed on same line if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and