diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-07-21 11:03:11 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-08-02 12:03:58 +0200 |
commit | 3f822cff4473fd6313f6c06623edf148b3ad2cc6 (patch) | |
tree | 2a51b58c840878bee0eb91cd7d342e0deb4ad550 /scripts/checkpatch.pl | |
parent | 056b68af773b31fa98fe4538f6424c0079b61415 (diff) |
checkpatch: add check for bzero
Tested-By: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index afa7f79f83..b7cb4ab478 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2544,7 +2544,7 @@ sub process { } } -# check for non-portable ffs() calls that have portable alternatives in QEMU +# check for non-portable libc calls that have portable alternatives in QEMU if ($line =~ /\bffs\(/) { ERROR("use ctz32() instead of ffs()\n" . $herecurr); } @@ -2554,6 +2554,9 @@ sub process { if ($line =~ /\bffsll\(/) { ERROR("use ctz64() instead of ffsll()\n" . $herecurr); } + if ($line =~ /\bbzero\(/) { + ERROR("use memset() instead of bzero()\n" . $herecurr); + } } # If we have no input at all, then there is nothing to report on |