From: Paolo Bonzini Date: Thu, 21 Jul 2016 09:03:11 +0000 (+0200) Subject: checkpatch: add check for bzero X-Git-Tag: v2.7.0-rc2~16^2~21 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3f822cff4473fd6313f6c06623edf148b3ad2cc6;p=qemu-xen-unstable.git checkpatch: add check for bzero Tested-By: Peter Xu Signed-off-by: Paolo Bonzini --- 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