[{"id":1769025,"web_url":"http://patchwork.ozlabs.org/comment/1769025/","msgid":"<20170915063640.GG5250@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-15T06:36:40","subject":"Re: [Qemu-devel] [PATCH v2 1/2] checkpatch: add hwaddr to @typeList","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Thu, Sep 14, 2017 at 04:14:33PM +0200, Greg Kurz wrote:\n> The script doesn't know about all possible types and learn them as\n> it parses the code. If it reaches a line with a type cast but the\n> type isn't known yet, it is misinterpreted as an identifier.\n> \n> For example the following line:\n> \n>     foo = (hwaddr) -1;\n> \n> results in the following false-positive to be reported:\n> \n> ERROR: spaces required around that '-' (ctx:VxV)\n> \n> Let's add this standard QEMU type to the list of pre-known types.\n> \n> Signed-off-by: Greg Kurz <groug@kaod.org>\n\nReviewed-by: David Gibson <david@gibson.dropbear.id.au>\n\nNot sure who should queue this, though.\n\n> ---\n>  scripts/checkpatch.pl |    1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl\n> index fa478074b88d..def5bc1cc0e1 100755\n> --- a/scripts/checkpatch.pl\n> +++ b/scripts/checkpatch.pl\n> @@ -213,6 +213,7 @@ our @typeList = (\n>  \tqr{${Ident}_handler},\n>  \tqr{${Ident}_handler_fn},\n>  \tqr{target_(?:u)?long},\n> +\tqr{hwaddr},\n>  );\n>  \n>  # This can be modified by sub possible.  Since it can be empty, be careful\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"XsoeVsaq\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtpFH4cqnz9sBZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 18:18:27 +1000 (AEST)","from localhost ([::1]:51882 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dslpR-0004YK-OU\n\tfor incoming@patchwork.ozlabs.org; Fri, 15 Sep 2017 04:18:25 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:59001)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dslmY-0001SD-2w\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 04:15:27 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dslmU-0004Rt-Mu\n\tfor qemu-devel@nongnu.org; Fri, 15 Sep 2017 04:15:26 -0400","from ozlabs.org ([103.22.144.67]:34793)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1dslmU-0004PS-5w; Fri, 15 Sep 2017 04:15:22 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xtp9f081Tz9t2Z; Fri, 15 Sep 2017 18:15:17 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1505463318;\n\tbh=tPKiUQOtP/ocHTRubA72dFKytFnAK52y59O9z+qoeM0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=XsoeVsaqX5IfwUFxZFoFf4rkr7X8l2osTjXGL4HxOqfBf/LJcuMY72wBilFHBSKV7\n\tZ2RQw8UwfbFSVqpfD3/OJRtuBd7Bca5W6zg2lMMtL1IXI1eAyRPq7ebVf4DYc01AC4\n\tQmkUSarWm5hkrneqcstP1iYz8uC5AqBaGsZeOPYM=","Date":"Fri, 15 Sep 2017 16:36:40 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"Greg Kurz <groug@kaod.org>","Message-ID":"<20170915063640.GG5250@umbus.fritz.box>","References":"<150539846159.21523.16161730500010192093.stgit@bahia>\n\t<150539847337.21523.1659017394355445790.stgit@bahia>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"ulDeV4rPMk/y39in\"","Content-Disposition":"inline","In-Reply-To":"<150539847337.21523.1659017394355445790.stgit@bahia>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"103.22.144.67","Subject":"Re: [Qemu-devel] [PATCH v2 1/2] checkpatch: add hwaddr to @typeList","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Alexey Kardashevskiy <aik@ozlabs.ru>, Paolo Bonzini <pbonzini@redhat.com>,\n\tqemu-ppc@nongnu.org, qemu-devel@nongnu.org,\n\tMichael Roth <mdroth@linux.vnet.ibm.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]