From: David Gibson <david@gibson.dropbear.id.au>
To: Greg Kurz <groug@kaod.org>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
Michael Roth <mdroth@linux.vnet.ibm.com>,
Alexey Kardashevskiy <aik@ozlabs.ru>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/2] checkpatch: add hwaddr to @typeList
Date: Fri, 15 Sep 2017 16:36:40 +1000 [thread overview]
Message-ID: <20170915063640.GG5250@umbus.fritz.box> (raw)
In-Reply-To: <150539847337.21523.1659017394355445790.stgit@bahia>
[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]
On Thu, Sep 14, 2017 at 04:14:33PM +0200, Greg Kurz wrote:
> The script doesn't know about all possible types and learn them as
> it parses the code. If it reaches a line with a type cast but the
> type isn't known yet, it is misinterpreted as an identifier.
>
> For example the following line:
>
> foo = (hwaddr) -1;
>
> results in the following false-positive to be reported:
>
> ERROR: spaces required around that '-' (ctx:VxV)
>
> Let's add this standard QEMU type to the list of pre-known types.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Not sure who should queue this, though.
> ---
> scripts/checkpatch.pl | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index fa478074b88d..def5bc1cc0e1 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -213,6 +213,7 @@ our @typeList = (
> qr{${Ident}_handler},
> qr{${Ident}_handler_fn},
> qr{target_(?:u)?long},
> + qr{hwaddr},
> );
>
> # This can be modified by sub possible. Since it can be empty, be careful
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-09-15 8:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 14:14 [Qemu-devel] [PATCH v2 0/2] spapr_pci: make index property mandatory Greg Kurz
2017-09-14 14:14 ` [Qemu-devel] [PATCH v2 1/2] checkpatch: add hwaddr to @typeList Greg Kurz
2017-09-15 6:36 ` David Gibson [this message]
2017-09-14 14:14 ` [Qemu-devel] [PATCH v2 2/2] spapr_pci: make index property mandatory Greg Kurz
2017-09-18 23:03 ` David Gibson
2017-09-19 14:03 ` Greg Kurz
2017-09-20 4:31 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170915063640.GG5250@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aik@ozlabs.ru \
--cc=groug@kaod.org \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).