diff options
| author | Tony Lindgren <tony@atomide.com> | 2021-02-15 06:41:56 +0200 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2021-02-15 06:41:56 +0200 |
| commit | 857de6fe2f86b009df620f7cdb07c262cc17070d (patch) | |
| tree | e9718ebeeef39485a51a9f8e3c8122da18c796cf /scripts/checkpatch.pl | |
| parent | 9bbce32a20d6a72c767a7f85fd6127babd1410ac (diff) | |
| parent | fbfa463be8dc7957ee4f81556e9e1ea2a951807d (diff) | |
Merge branch 'fixes-v5.11' into fixes
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 00085308ed9d..1afe3af1cc09 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3390,13 +3390,6 @@ sub process { } } -# discourage the use of boolean for type definition attributes of Kconfig options - if ($realfile =~ /Kconfig/ && - $line =~ /^\+\s*\bboolean\b/) { - WARN("CONFIG_TYPE_BOOLEAN", - "Use of boolean is deprecated, please use bool instead.\n" . $herecurr); - } - if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) && ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) { my $flag = $1; @@ -6646,6 +6639,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 && |
