Message ID | 1486755469-21573-1-git-send-email-william.c.roberts@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 982c52c..f20f5c5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -6096,6 +6096,12 @@ sub process { "recursive locking is bad, do not use this ever.\n" . $herecurr); } +# check for bad %pK usage + if ($rawline =~ /\%pk/) { + WARN("FORMAT SPECIFIER", + "%pk is close to %pK, did you mean %pK?.\n" . $herecurr); + } + # check for lockdep_set_novalidate_class if ($line =~ /^.\s*lockdep_set_novalidate_class\s*\(/ || $line =~ /__lockdep_no_validate__\s*\)/ ) {