From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGlb8-00008a-L8 for qemu-devel@nongnu.org; Thu, 10 May 2018 09:27:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGlb2-0003lO-S0 for qemu-devel@nongnu.org; Thu, 10 May 2018 09:27:06 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39342 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fGlb2-0003lD-Nu for qemu-devel@nongnu.org; Thu, 10 May 2018 09:27:00 -0400 References: <20180510091518.28199-1-paul.durrant@citrix.com> <20180510091518.28199-3-paul.durrant@citrix.com> From: Eric Blake Message-ID: Date: Thu, 10 May 2018 08:26:58 -0500 MIME-Version: 1.0 In-Reply-To: <20180510091518.28199-3-paul.durrant@citrix.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/3] checkpatch: generalize xen handle matching in the list of types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Durrant , qemu-devel@nongnu.org, xen-devel@lists.xenproject.org Cc: Paolo Bonzini , "Daniel P . Berrange" On 05/10/2018 04:15 AM, Paul Durrant wrote: > All the xen stable APIs define handle types of the form: > > _handle > > and some define additional handle types of the form: > > __handle Maybe worth mentioning that always has a 'xen' prefix, and/or spelling it: xen_handle xen__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 > --- > Cc: Eric Blake > Cc: Paolo Bonzini > Cc: Daniel P. Berrange > > v2: > - New in this version Reviewed-by: Eric Blake > --- > 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