From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ9tE-0004bW-Rc for qemu-devel@nongnu.org; Thu, 21 Jul 2016 05:03:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQ9t9-0008TW-Sh for qemu-devel@nongnu.org; Thu, 21 Jul 2016 05:03:31 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:32968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQ9t9-0008TH-MW for qemu-devel@nongnu.org; Thu, 21 Jul 2016 05:03:27 -0400 Received: by mail-wm0-x241.google.com with SMTP id o80so1799244wme.0 for ; Thu, 21 Jul 2016 02:03:27 -0700 (PDT) Received: from donizetti.lan (94-39-158-5.adsl-ull.clienti.tiscali.it. [94.39.158.5]) by smtp.gmail.com with ESMTPSA id u72sm2334961wmf.5.2016.07.21.02.03.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jul 2016 02:03:24 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 21 Jul 2016 11:03:20 +0200 Message-Id: <1469091800-24164-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] checkpatch: add check for bzero List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Paolo Bonzini --- 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