aboutsummaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorLinus Walleij <[email protected]>2021-01-26 15:35:13 +0100
committerLinus Walleij <[email protected]>2021-01-26 15:35:13 +0100
commitb4478a080673958aa8b35d8de46ba7589c8fcc47 (patch)
treec896b8272e0aad398e99ed98231775b7b474dd02 /scripts/checkpatch.pl
parent3bbf9b89592d18c391eafd7a5e0e7429ae2dc767 (diff)
parente71ba9452f0b5b2e8dc8aa5445198cd9214a6a62 (diff)
Merge tag 'v5.11-rc2' into devel
Linux 5.11-rc2
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 00085308ed9d..92e888ed939f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6646,6 +6646,12 @@ sub process {
# }
# }
+# strlcpy uses that should likely be strscpy
+ if ($line =~ /\bstrlcpy\s*\(/) {
+ WARN("STRLCPY",
+ "Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw\@mail.gmail.com/\n" . $herecurr);
+ }
+
# typecasts on min/max could be min_t/max_t
if ($perl_version_ok &&
defined $stat &&