From: Paolo Bonzini <pbonzini@redhat.com>
To: Greg Kurz <groug@kaod.org>, qemu-devel@nongnu.org
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] checkpatch: add hwaddr to @typeList
Date: Thu, 14 Sep 2017 15:16:50 +0200 [thread overview]
Message-ID: <b1df38c4-25c1-c91c-85e3-f984b5491d65@redhat.com> (raw)
In-Reply-To: <150538015789.8149.10902725348939486674.stgit@bahia.lan>
On 14/09/2017 11:12, 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>
> ---
>
> checkpatch doesn't have an official maintainer, Cc'ing David in case he
> agrees to carry this patch through his ppc tree, along with:
>
> https://lists.nongnu.org/archive/html/qemu-devel/2017-09/msg03686.html
>
> 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
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2017-09-15 8:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 9:12 [Qemu-devel] [PATCH] checkpatch: add hwaddr to @typeList Greg Kurz
2017-09-14 13:16 ` Paolo Bonzini [this message]
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=b1df38c4-25c1-c91c-85e3-f984b5491d65@redhat.com \
--to=pbonzini@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=qemu-devel@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).