From patchwork Fri Nov 25 03:17:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chubb X-Patchwork-Id: 127637 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 282421007D1 for ; Fri, 25 Nov 2011 14:17:51 +1100 (EST) Received: from localhost ([::1]:47736 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTmIN-00037o-7D for incoming@patchwork.ozlabs.org; Thu, 24 Nov 2011 22:17:47 -0500 Received: from eggs.gnu.org ([140.186.70.92]:38343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTmIF-00037U-Pn for qemu-devel@nongnu.org; Thu, 24 Nov 2011 22:17:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTmIE-0004VI-82 for qemu-devel@nongnu.org; Thu, 24 Nov 2011 22:17:39 -0500 Received: from lemon.ertos.nicta.com.au ([203.143.174.143]:58775 helo=lemon.ken.nicta.com.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTmID-0004Uw-Ok for qemu-devel@nongnu.org; Thu, 24 Nov 2011 22:17:38 -0500 Received: from [2402:1800:4000:2:224:d7ff:feaf:390] (port=59156 helo=Diprotodon.keg.ertos.in.nicta.com.au.chubb.wattle.id.au) by lemon.ken.nicta.com.au with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1RTmI1-0008I9-22; Fri, 25 Nov 2011 14:17:26 +1100 Date: Fri, 25 Nov 2011 14:17:22 +1100 Message-ID: From: Peter Chubb To: Anthony Liguori , qemu-devel@nongnu.org User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/23.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-Face: GgFg(Z>fx((4\32hvXq<)|jndSniCH~~$D)Ka:P@e@JR1P%Vr}EwUdfwf-4j\rUs#JR{'h# !]])6%Jh~b$VA|ALhnpPiHu[-x~@<"@Iv&|%R)Fq[[, (&Z'O)Q)xCqe1\M[F8#9l8~}#u$S$Rm`S9% \'T@`:&8>Sb*c5d'=eDYI&GF`+t[LfDH="MP5rwOO]w>ALi7'=QJHz&y&C&TE_3j! Organization: National ICT Australia MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") X-SA-Exim-Connect-IP: 2402:1800:4000:2:224:d7ff:feaf:390 X-SA-Exim-Mail-From: peter.chubb@nicta.com.au X-SA-Exim-Version: 4.2.1 (built Mon, 22 Mar 2010 06:52:44 +0000) X-SA-Exim-Scanned: Yes (on lemon.ken.nicta.com.au) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 203.143.174.143 Subject: [Qemu-devel] Who maintains checkpatch.pl now? X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Who maintainss checkpatch.pl now? checkpatch.pl says to look for CHECKPATCH in the MAINTAINERS file, but that entry isn't there. The issue I'm encountering is that sizeof is not a function, but an operator, that takes as its operand either a variable or a cast. As such there needn't be any parentheses (if the operand is a variable), and there should a space before the cast. In the QEMU code at present, the use of whitespace around sizeof varies from file to file; checkpatch.pl complains about sizeof (struct foo) WARNING: space prohibited between function name and open parenthesis '(' If I fix the problem as in the appended patch, I start seeing other complaints: ERROR: space prohibited after that '*' (ctx:WxW) +#define PRIO_PER_WORD (sizeof (uint32_t) * 8 / 4) ^ --- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au http://www.ertos.nicta.com.au ERTOS within National ICT Australia Index: qemu-working/scripts/checkpatch.pl =================================================================== --- qemu-working.orig/scripts/checkpatch.pl 2011-11-10 10:16:43.215022488 +1100 +++ qemu-working/scripts/checkpatch.pl 2011-11-25 14:02:30.908358997 +1100 @@ -1953,21 +1953,21 @@ sub process { } # check for spaces between functions and their parentheses. while ($line =~ /($Ident)\s+\(/g) { my $name = $1; my $ctx_before = substr($line, 0, $-[1]); my $ctx = "$ctx_before$name"; # Ignore those directives where spaces _are_ permitted. if ($name =~ /^(?: - if|for|while|switch|return|case| + if|for|while|switch|return|case|sizeof| volatile|__volatile__| __attribute__|format|__extension__| asm|__asm__)$/x) { # cpp #define statements have non-optional spaces, ie # if there is a space between the name and the open # parenthesis it is simply not a parameter group. } elsif ($ctx_before =~ /^.\s*\#\s*define\s*$/) {