aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-01-13 17:57:04 +0000
committerMark Brown <broonie@kernel.org>2021-01-13 17:57:04 +0000
commit09db7311ca6170d36f2bb8c26eab8fadc4d10b81 (patch)
tree4aa6bd9ddb3ca49f23182d778b9ee7b02bf54b56 /scripts/checkpatch.pl
parentregulator: core: avoid regulator_resolve_supply() race condition (diff)
parentLinux 5.11-rc3 (diff)
downloadlinux-09db7311ca6170d36f2bb8c26eab8fadc4d10b81.tar.gz
linux-09db7311ca6170d36f2bb8c26eab8fadc4d10b81.zip
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 &&