xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: wei.liu2@citrix.com, Olaf Hering <olaf@aepfle.de>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] tools: libxc: do not redefine evtchn_port_or_error_t in xc_evtchn_compat.c
Date: Thu, 4 Feb 2016 11:08:49 +0000	[thread overview]
Message-ID: <20160204110849.GN23178@citrix.com> (raw)
In-Reply-To: <1454581195.25207.151.camel@citrix.com>

On Thu, Feb 04, 2016 at 10:19:55AM +0000, Ian Campbell wrote:
> Adding Olaf, I forgot that Reported-by doesn't turn into a Cc.
> 
> On Thu, 2016-02-04 at 10:15 +0000, Ian Campbell wrote:
> > This file stradles the xenevtchn and libxc evtchn_compat worlds, and
> > hence ends up with two evtchn_port_or_error_t typedefs which older
> > gcc's (and the C standard) do not like.
> > 
> > Avoid this by gating the compat definition on a gate provided by the
> > compat implementation.
> > 
> > Note that this would still be broken by an application which does:
> >     #define XC_WANT_COMPAT_EVTCHN_API
> >     #include <xenevtchn.h>
> >     #include <xenctrl.h>
> > 
> > Which effectively means that an application must be ported over to
> > xenevtchn in one go rather than incrementally (e.g. if it uses
> > evtchn's for multiple purposes). Since the port is actually fairly
> > mechanical I hope this is acceptable.
> > 
> > Reported-by: Olaf Hering <olaf@aepfle.de>
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > ---
> > I'm not super happy about this approach, due to the caveat in the
> > second half of the commit message.
> > 
> > Other approaches:
> > 
> > rename the libxenevtchn type, e.g.  xenevtchn_port_or_error_t?
> 
> Thinking about this some more this might be the best approach. The type is
> not used by qemu-xen, it is used by qemu-xen-traditional but we can fix
> that in lockstep.
> 
> All of the in tree users are easy, of course.
> 
> Thoughts?
> 

+1 for this

  parent reply	other threads:[~2016-02-04 11:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 10:15 [PATCH] tools: libxc: do not redefine evtchn_port_or_error_t in xc_evtchn_compat.c Ian Campbell
2016-02-04 10:19 ` Ian Campbell
2016-02-04 10:51   ` Andrew Cooper
2016-02-04 11:08   ` Wei Liu [this message]
2016-02-04 11:25 ` Olaf Hering

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=20160204110849.GN23178@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=olaf@aepfle.de \
    --cc=xen-devel@lists.xen.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).