diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8657f99bfb2b..b0aa2c680593 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1943,6 +1943,11 @@ sub process { | |||
1943 | WARN("LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged\n" . $herecurr); | 1943 | WARN("LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged\n" . $herecurr); |
1944 | } | 1944 | } |
1945 | 1945 | ||
1946 | # check for uses of printk_ratelimit | ||
1947 | if ($line =~ /\bprintk_ratelimit\s*\(/) { | ||
1948 | WARN("Prefer printk_ratelimited or pr_<level>_ratelimited to printk_ratelimit\n" . $herecurr); | ||
1949 | } | ||
1950 | |||
1946 | # printk should use KERN_* levels. Note that follow on printk's on the | 1951 | # printk should use KERN_* levels. Note that follow on printk's on the |
1947 | # same line do not need a level, so we use the current block context | 1952 | # same line do not need a level, so we use the current block context |
1948 | # to try and find and validate the current printk. In summary the current | 1953 | # to try and find and validate the current printk. In summary the current |