From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUfXX-0006V7-GW for qemu-devel@nongnu.org; Tue, 02 Aug 2016 15:39:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUfXV-0003SG-EE for qemu-devel@nongnu.org; Tue, 02 Aug 2016 15:39:46 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:35536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUfXV-0003Rv-7J for qemu-devel@nongnu.org; Tue, 02 Aug 2016 15:39:45 -0400 Received: by mail-wm0-x244.google.com with SMTP id i5so32588417wmg.2 for ; Tue, 02 Aug 2016 12:39:45 -0700 (PDT) Received: from donizetti.lan (94-39-152-88.adsl-ull.clienti.tiscali.it. [94.39.152.88]) by smtp.gmail.com with ESMTPSA id v134sm23554568wmf.10.2016.08.02.12.39.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Aug 2016 12:39:43 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 2 Aug 2016 21:39:14 +0200 Message-Id: <1470166775-3671-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1470166775-3671-1-git-send-email-pbonzini@redhat.com> References: <1470166775-3671-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 04/25] checkpatch: add check for bzero List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Tested-By: Peter Xu 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