Received: from eggs.gnu.org ([2001:4830:134:3::10]:32944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQAz2-00060A-Co for qemu-devel@nongnu.org; Thu, 21 Jul 2016 06:13:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQAyx-00075B-FO for qemu-devel@nongnu.org; Thu, 21 Jul 2016 06:13:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQAyx-00074q-9A for qemu-devel@nongnu.org; Thu, 21 Jul 2016 06:13:31 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F045D7F402 for ; Thu, 21 Jul 2016 10:13:30 +0000 (UTC) Date: Thu, 21 Jul 2016 18:13:27 +0800 From: Peter Xu Message-ID: <20160721101327.GE32544@pxdev.xzpeter.org> References: <1469091800-24164-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1469091800-24164-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] checkpatch: add check for bzero List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Thu, Jul 21, 2016 at 11:03:20AM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini Thanks, Paolo. Tested-By: Peter Xu > --- > scripts/checkpatch.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index afa7f79..b7cb4ab 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 > -- > 2.7.4 > >