diff options
author | Tom Rini <trini@konsulko.com> | 2021-04-13 09:50:45 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-13 09:50:45 -0400 |
commit | a94ab561e2f49a80d8579930e840b810ab1a1330 (patch) | |
tree | 77913e7bd9309afa6b2ddc6f3e3e49827da2025c /scripts/checkpatch.pl | |
parent | 3b676a1662ac6b54d1e97ea40a0c41ee0925ffe3 (diff) | |
parent | 8c4e3b79bd0bb76eea16869e9666e19047c0d005 (diff) |
Merge branch '2021-04-13-assorted-improvements'
- A large assortment of bug fixes, code cleanups and a few feature
enhancements.
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 755f4802a46..4e047586a68 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2365,6 +2365,12 @@ sub u_boot_line { "Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible\n" . $herecurr); } + # prefer strl(cpy|cat) over strn(cpy|cat) + if ($line =~ /\bstrn(cpy|cat)\s*\(/) { + WARN("STRL", + "strl$1 is preferred over strn$1 because it always produces a nul-terminated string\n" . $herecurr); + } + # use defconfig to manage CONFIG_CMD options if ($line =~ /\+\s*#\s*(define|undef)\s+(CONFIG_CMD\w*)\b/) { ERROR("DEFINE_CONFIG_CMD", |