Received: from eggs.gnu.org ([2001:4830:134:3::10]:40977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alvZ4-0007lm-Px for qemu-devel@nongnu.org; Fri, 01 Apr 2016 05:40:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alvYz-0004Wu-PE for qemu-devel@nongnu.org; Fri, 01 Apr 2016 05:40:26 -0400 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:56488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alvYz-0004Wf-Ej for qemu-devel@nongnu.org; Fri, 01 Apr 2016 05:40:21 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 1 Apr 2016 10:40:19 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0C1531B0805F for ; Fri, 1 Apr 2016 10:40:52 +0100 (BST) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u319eGXg7733574 for ; Fri, 1 Apr 2016 09:40:16 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u319eF7c017813 for ; Fri, 1 Apr 2016 05:40:15 -0400 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Fri, 1 Apr 2016 11:40:06 +0200 Message-Id: <1459503606-31603-1-git-send-email-clg@fr.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH] checkpatch: add target_ulong to typelist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-devel@nongnu.org, Greg Kurz 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 --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) Index: qemu-dgibson-for-2.6.git/scripts/checkpatch.pl =================================================================== --- qemu-dgibson-for-2.6.git.orig/scripts/checkpatch.pl +++ qemu-dgibson-for-2.6.git/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