All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Kővágó, Zoltán" <dirty.ice.hu@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	qemu-devel@nongnu.org, Vincenzo Maffione <v.maffione@gmail.com>,
	Alexander Graf <agraf@suse.de>, Max Filippov <jcmvbkbc@gmail.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Dmitry Fleytman <dmitry@daynix.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	Rob Herring <robh@kernel.org>,
	Markus Armbruster <armbru@redhat.com>,
	Scott Feldman <sfeldma@gmail.com>, Jiri Pirko <jiri@resnulli.us>,
	Jan Kiszka <jan.kiszka@web.de>,
	Giuseppe Lettieri <g.lettieri@iet.unipi.it>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Luigi Rizzo <rizzo@iet.unipi.it>,
	David Gibson <david@gibson.dropbear.id.au>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	Michael Walle <michael@walle.cc>,
	"open list:sPAPR (pseries)" <qemu-ppc@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v3 3/8] qapi: change Netdev and NetLegacy into a flat union
Date: Fri, 19 Jun 2015 15:06:32 +0100	[thread overview]
Message-ID: <20150619140632.GA18654@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <ae443cdf65c94a99e5c00a6273bd6556081dd5cd.1434644665.git.DirtY.iCE.hu@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]

On Thu, Jun 18, 2015 at 06:43:45PM +0200, Kővágó, Zoltán wrote:
> @@ -713,8 +710,6 @@ int net_init_tap(const NetClientOptions *opts, const char *name,
>      const char *vhostfdname;
>      char ifname[128];
>  
> -    assert(opts->kind == NET_CLIENT_OPTIONS_KIND_TAP);
> -    tap = opts->tap;
...
> @@ -109,14 +109,11 @@ static int net_vde_init(NetClientState *peer, const char *model,
>      return 0;
>  }
>  
> -int net_init_vde(const NetClientOptions *opts, const char *name,
> +int net_init_vde(const void *opts, const char *name,
>                   NetClientState *peer, Error **errp)
>  {
>      /* FIXME error_setg(errp, ...) on failure */
> -    const NetdevVdeOptions *vde;
> -
> -    assert(opts->kind == NET_CLIENT_OPTIONS_KIND_VDE);
> -    vde = opts->vde;
> +    const NetdevVdeOptions *vde = opts;
>  
>      /* missing optional values have been initialized to "all bits zero" */
>      if (net_vde_init(peer, "vde", name, vde->sock, vde->port, vde->group,
...
> @@ -228,16 +228,13 @@ static int net_vhost_check_net(void *opaque, QemuOpts *opts, Error **errp)
>      return 0;
>  }
>  
> -int net_init_vhost_user(const NetClientOptions *opts, const char *name,
> +int net_init_vhost_user(const void *opts, const char *name,
>                          NetClientState *peer, Error **errp)
>  {
>      uint32_t queues;
> -    const NetdevVhostUserOptions *vhost_user_opts;
> +    const NetdevVhostUserOptions *vhost_user_opts = opts;
>      CharDriverState *chr;
>  
> -    assert(opts->kind == NET_CLIENT_OPTIONS_KIND_VHOST_USER);
> -    vhost_user_opts = opts->vhost_user;
> -

Why drop the assertion?

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-06-19 14:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 16:43 [Qemu-devel] [PATCH v3 0/8] -audiodev option Kővágó, Zoltán
2015-06-18 16:43 ` [Qemu-devel] [PATCH v3 1/8] qapi: support implicit structs in OptsVisitor Kővágó, Zoltán
2015-06-18 16:43 ` [Qemu-devel] [PATCH v3 2/8] qapi: convert NumaOptions into a flat union Kővágó, Zoltán
2015-06-18 16:43 ` [Qemu-devel] [PATCH v3 3/8] qapi: change Netdev and NetLegacy " Kővágó, Zoltán
2015-06-19 14:06   ` Stefan Hajnoczi [this message]
2015-06-19 14:56     ` Kővágó Zoltán
2015-06-18 16:43 ` [Qemu-devel] [PATCH v3 4/8] qapi: qapi for audio backends Kővágó, Zoltán
2015-06-18 16:43 ` [Qemu-devel] [PATCH v3 5/8] qapi: support nested structs in OptsVisitor Kővágó, Zoltán
2015-06-18 17:15   ` Laszlo Ersek
2015-06-18 17:35     ` Kővágó Zoltán
2015-06-18 16:43 ` [Qemu-devel] [PATCH v3 6/8] opts: produce valid command line in qemu_opts_print Kővágó, Zoltán
2015-06-18 16:43 ` [Qemu-devel] [PATCH v3 7/8] audio: use qapi AudioFormat instead of audfmt_e Kővágó, Zoltán
2015-06-18 16:43 ` [Qemu-devel] [PATCH v3 8/8] audio: -audiodev command line option Kővágó, Zoltán

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=20150619140632.GA18654@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=agraf@suse.de \
    --cc=armbru@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dirty.ice.hu@gmail.com \
    --cc=dmitry@daynix.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=g.lettieri@iet.unipi.it \
    --cc=jan.kiszka@web.de \
    --cc=jasowang@redhat.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=kraxel@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=michael@walle.cc \
    --cc=mst@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rizzo@iet.unipi.it \
    --cc=robh@kernel.org \
    --cc=sfeldma@gmail.com \
    --cc=v.maffione@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.