qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Paul Durrant <paul.durrant@citrix.com>,
	qemu-devel@nongnu.org, xen-devel@lists.xenproject.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	"Daniel P . Berrange" <berrange@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 2/3] checkpatch: generalize xen handle matching in the list of types
Date: Thu, 10 May 2018 08:26:58 -0500	[thread overview]
Message-ID: <dd5e2ec4-d809-3a06-0e06-21c88e5d5d7e@redhat.com> (raw)
In-Reply-To: <20180510091518.28199-3-paul.durrant@citrix.com>

On 05/10/2018 04:15 AM, Paul Durrant wrote:
> All the xen stable APIs define handle types of the form:
> 
> <name of API>_handle
> 
> and some define additional handle types of the form:
> 
> <name of API>_<purpose of handle>_handle

Maybe worth mentioning that <name of API> always has a 'xen' prefix, 
and/or spelling it:

xen<name of object>_handle
xen<name of object>_<purpose>_handle

> 
> Examples of these are xenforeignmemory_handle and
> xenforeignmemory_resource_handle.
> 
> Both of these types will be misparsed by checkpatch if they appear as the
> first token in a line since, as types defined by an external library, they
> do not conform to the QEMU CODING_STYLE, which suggests CamelCase.
> 
> A previous patch (5ac067a24a8) added xendevicemodel_handle to the list
> of types. This patch changes that to xen\w+_handle such that it will
> match all Xen stable API handles of the forms detailed above.

Nice use of a regex.

> 
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> Cc: Eric Blake <eblake@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Daniel P. Berrange <berrange@redhat.com>
> 
> v2:
>   - New in this version

Reviewed-by: Eric Blake <eblake@redhat.com>

> ---
>   scripts/checkpatch.pl | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 5b8735defb..98ed799f29 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -266,7 +266,7 @@ our @typeList = (
>   	qr{target_(?:u)?long},
>   	qr{hwaddr},
>   	qr{xml${Ident}},
> -	qr{xendevicemodel_handle},
> +	qr{xen\w+_handle},
>   );
>   
>   # This can be modified by sub possible.  Since it can be empty, be careful
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

  reply	other threads:[~2018-05-10 13:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10  9:15 [Qemu-devel] [PATCH v2 0/2] xen-hvm: use new resource mapping API Paul Durrant
2018-05-10  9:15 ` [Qemu-devel] [PATCH v2 1/3] xen-hvm: create separate function for ioreq server initialization Paul Durrant
2018-05-15 14:40   ` Anthony PERARD
2018-05-10  9:15 ` [Qemu-devel] [PATCH v2 2/3] checkpatch: generalize xen handle matching in the list of types Paul Durrant
2018-05-10 13:26   ` Eric Blake [this message]
2018-05-10  9:15 ` [Qemu-devel] [PATCH v2 3/3] xen-hvm: try to use xenforeignmemory_map_resource() to map ioreq pages Paul Durrant
2018-05-15 15:38   ` Anthony PERARD
2018-05-15 15:45     ` Paul Durrant
2018-05-15 16:16       ` Anthony PERARD
2018-05-15 16:26         ` Paul Durrant
2018-05-15 16:42         ` Eric Blake
2018-05-14  9:38 ` [Qemu-devel] [PATCH v2 0/2] xen-hvm: use new resource mapping API Paul Durrant

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=dd5e2ec4-d809-3a06-0e06-21c88e5d5d7e@redhat.com \
    --to=eblake@redhat.com \
    --cc=berrange@redhat.com \
    --cc=paul.durrant@citrix.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xenproject.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).