From: Ian Campbell Subject: Re: [PATCH 20/21] xen: replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when appropriate Date: Fri, 5 Oct 2012 13:12:38 +0100 Message-ID: <1349439158.20946.77.camel@zakaz.uk.xensource.com> References: <1349433418.20946.46.camel@zakaz.uk.xensource.com> <1349433507-21148-20-git-send-email-ian.campbell@citrix.com> <1349436628.20946.63.camel@zakaz.uk.xensource.com> <506EE3FF020000780009FF1B@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <506EE3FF020000780009FF1B@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: "Tim (Xen.org)" , "xen-devel@lists.xen.org" , "Keir (Xen.org)" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, 2012-10-05 at 12:43 +0100, Jan Beulich wrote: > >>> On 05.10.12 at 13:30, Ian Campbell wrote: > > This probably ought to be folded into the original patch rather than > > kept separate. > > Think so, yes. > > > --- a/xen/include/public/tmem.h > > +++ b/xen/include/public/tmem.h > > @@ -96,7 +96,8 @@ > > > > #ifndef __ASSEMBLY__ > > typedef xen_pfn_t tmem_cli_mfn_t; > > -typedef XEN_GUEST_HANDLE_PARAM(char) tmem_cli_va_t; > > +typedef XEN_GUEST_HANDLE(char) tmem_cli_va_t; > > +typedef XEN_GUEST_HANDLE_PARAM(char) tmem_cli_va_param_t; > > This doesn't belong here - there's no use of tmem_cli_va_param_t > anywhere in the public interface afaict. Right. I'll throw it in xen/include/xen/tmem_xen.h instead. > I didn't check, but if there > are other uses of XEN_GUEST_HANDLE_PARAM() in the public > headers, I would suspect them to be wrong too - at the interface > layer, there shouldn't be any need for them. Only the #define itself. > > > --- a/xen/include/xen/compat.h > > +++ b/xen/include/xen/compat.h > > @@ -21,7 +21,9 @@ > > __DEFINE_COMPAT_HANDLE(name, name); \ > > __DEFINE_COMPAT_HANDLE(const_ ## name, const name) > > #define COMPAT_HANDLE(name) __compat_handle_ ## name > > - > > +/* NB: it is assumed that if an arch uses the compat layer it does not > > + * distinguish handles from parameter handles. */ > > +#define COMPAT_HANDLE_PARAM(name) __compat_handle_ ## name > > /* Is the compat handle a NULL reference? */ > > #define compat_handle_is_null(hnd) ((hnd).c == 0) > > This seems acceptable to me (minus the dropped newline). Thanks. Ian.