summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-01-13 17:56:59 +0000
committerMark Brown <broonie@kernel.org>2021-01-13 17:56:59 +0000
commit2d446c98cde3ffccfd14849b7dda4194ab62dd20 (patch)
tree9b7f048dcddec04d94527132834fc056745fdb6d /scripts/checkpatch.pl
parent44a4cfad8d78efcda9ec0dd97ceea38d8b602f24 (diff)
parent7c53f6b671f4aba70ff15e1b05148b10d58c2837 (diff)
Merge v5.11-rc3
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 &&