From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1bwb-0001Ef-Kx for qemu-devel@nongnu.org; Tue, 01 Nov 2016 12:29:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1bwa-0006RI-7P for qemu-devel@nongnu.org; Tue, 01 Nov 2016 12:29:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41900) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1bwa-0006RD-1X for qemu-devel@nongnu.org; Tue, 01 Nov 2016 12:29:48 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 4B5308E740 for ; Tue, 1 Nov 2016 16:29:47 +0000 (UTC) From: Paolo Bonzini Date: Tue, 1 Nov 2016 17:29:14 +0100 Message-Id: <1478017783-7703-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1478017783-7703-1-git-send-email-pbonzini@redhat.com> References: <1478017783-7703-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 01/30] checkpatch: tweak "struct should normally be const" warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: John Snow Avoid triggering on typedef struct BlockJobDriver BlockJobDriver; or struct BlockJobDriver { Cc: John Snow Signed-off-by: Paolo Bonzini --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3afa19a..1f1c9d3 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2498,8 +2498,8 @@ sub process { VMStateDescription| VMStateInfo}x; if ($line !~ /\bconst\b/ && - $line =~ /\b($struct_ops)\b/) { - ERROR("struct $1 should normally be const\n" . + $line =~ /\b($struct_ops)\b.*=/) { + ERROR("initializer for struct $1 should normally be const\n" . $herecurr); } -- 2.7.4