Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751764AbdFGSJj (ORCPT ); Wed, 7 Jun 2017 14:09:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:60154 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbdFGSJh (ORCPT ); Wed, 7 Jun 2017 14:09:37 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E790622CB4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=sstabellini@kernel.org Date: Wed, 7 Jun 2017 11:09:35 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-X260 To: Sergey Dyasli cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Paul Durrant , Stefano Stabellini , Boris Ostrovsky , Juergen Gross , Julien Grall , Marc Zyngier , Jan Beulich , Andrew Cooper Subject: Re: [PATCH v2] xen: fix HYPERVISOR_dm_op() prototype In-Reply-To: <20170607072012.20397-1-sergey.dyasli@citrix.com> Message-ID: References: <20170607072012.20397-1-sergey.dyasli@citrix.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2336 Lines: 66 On Wed, 7 Jun 2017, Sergey Dyasli wrote: > Change the third parameter to be the required struct xen_dm_op_buf * > instead of a generic void * (which blindly accepts any pointer). > > Signed-off-by: Sergey Dyasli Reviewed-by: Stefano Stabellini > --- > v1 --> v2: > - Replaced "#include " with > forward declaration of struct xen_dm_op_buf > > arch/x86/include/asm/xen/hypercall.h | 4 +++- > include/xen/arm/hypercall.h | 5 ++++- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h > index f6d20f6cca12..7a4db5fefd15 100644 > --- a/arch/x86/include/asm/xen/hypercall.h > +++ b/arch/x86/include/asm/xen/hypercall.h > @@ -50,6 +50,8 @@ > #include > #include > > +struct xen_dm_op_buf; > + > /* > * The hypercall asms have to meet several constraints: > * - Work on 32- and 64-bit. > @@ -474,7 +476,7 @@ HYPERVISOR_xenpmu_op(unsigned int op, void *arg) > > static inline int > HYPERVISOR_dm_op( > - domid_t dom, unsigned int nr_bufs, void *bufs) > + domid_t dom, unsigned int nr_bufs, struct xen_dm_op_buf *bufs) > { > return _hypercall3(int, dm_op, dom, nr_bufs, bufs); > } > diff --git a/include/xen/arm/hypercall.h b/include/xen/arm/hypercall.h > index 73db4b2eeb89..b40485e54d80 100644 > --- a/include/xen/arm/hypercall.h > +++ b/include/xen/arm/hypercall.h > @@ -39,6 +39,8 @@ > #include > #include > > +struct xen_dm_op_buf; > + > long privcmd_call(unsigned call, unsigned long a1, > unsigned long a2, unsigned long a3, > unsigned long a4, unsigned long a5); > @@ -53,7 +55,8 @@ int HYPERVISOR_physdev_op(int cmd, void *arg); > int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args); > int HYPERVISOR_tmem_op(void *arg); > int HYPERVISOR_vm_assist(unsigned int cmd, unsigned int type); > -int HYPERVISOR_dm_op(domid_t domid, unsigned int nr_bufs, void *bufs); > +int HYPERVISOR_dm_op(domid_t domid, unsigned int nr_bufs, > + struct xen_dm_op_buf *bufs); > int HYPERVISOR_platform_op_raw(void *arg); > static inline int HYPERVISOR_platform_op(struct xen_platform_op *op) > { > -- > 2.11.0 >