From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anNd2-0003Wh-4K for qemu-devel@nongnu.org; Tue, 05 Apr 2016 05:50:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anNd1-00019M-1n for qemu-devel@nongnu.org; Tue, 05 Apr 2016 05:50:32 -0400 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:37027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anNd0-000196-Mb for qemu-devel@nongnu.org; Tue, 05 Apr 2016 05:50:30 -0400 Received: by mail-wm0-x22b.google.com with SMTP id n3so13995534wmn.0 for ; Tue, 05 Apr 2016 02:50:30 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 5 Apr 2016 11:50:09 +0200 Message-Id: <1459849818-26649-7-git-send-email-pbonzini@redhat.com> In-Reply-To: <1459849818-26649-1-git-send-email-pbonzini@redhat.com> References: <1459849818-26649-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PULL 06/15] checkpatch: add target_ulong to typelist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= From: Cédric Le Goater In some occasions, a patch [1] can start with a hunk containing a simple type cast. At the time annotate_values() is run, the type is unknown and the cast type is misinterpreted as a identifier, resulting in an error if it is followed with a negative value: ERROR: spaces required around that '-' (ctx:WxV) It seems complex to catch all possible types in a cast expression. So, as a fallback solution, let's add some common qemu types to the typeList array. [1] http://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg06741.html Signed-off-by: Cédric Le Goater Message-Id: <1459503606-31603-1-git-send-email-clg@fr.ibm.com> Signed-off-by: Paolo Bonzini --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c26f76e..c9554ba 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -212,6 +212,7 @@ our @typeList = ( qr{${Ident}_t}, qr{${Ident}_handler}, qr{${Ident}_handler_fn}, + qr{target_(?:u)?long}, ); # This can be modified by sub possible. Since it can be empty, be careful -- 2.5.5