Skip to content

Commit

Permalink
checkpatch: add check for bzero
Browse files Browse the repository at this point in the history
Tested-By: Peter Xu <peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Aug 2, 2016
1 parent 056b68a commit 3f822cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/checkpatch.pl
Expand Up @@ -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);
}
Expand All @@ -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
Expand Down

0 comments on commit 3f822cf

Please sign in to comment.