From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y72sa-0001cE-V2 for qemu-devel@nongnu.org; Fri, 02 Jan 2015 09:07:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y72sX-0001mp-Nt for qemu-devel@nongnu.org; Fri, 02 Jan 2015 09:07:04 -0500 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:47684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y72sX-0001md-H9 for qemu-devel@nongnu.org; Fri, 02 Jan 2015 09:07:01 -0500 Received: by mail-wg0-f52.google.com with SMTP id x12so24110996wgg.11 for ; Fri, 02 Jan 2015 06:07:00 -0800 (PST) Date: Fri, 2 Jan 2015 14:06:58 +0000 From: Stefan Hajnoczi Message-ID: <20150102140658.GL10823@stefanha-thinkpad.redhat.com> References: <1419353600-30519-2-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hdW7zL/qDS6RXdAL" Content-Disposition: inline In-Reply-To: <1419353600-30519-2-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] net: synchronize net_host_device_remove with host_net_remove_completion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, stefanha@redhat.com --hdW7zL/qDS6RXdAL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 23, 2014 at 05:53:20PM +0100, Paolo Bonzini wrote: > @@ -324,6 +324,8 @@ void qemu_del_net_client(NetClientState *nc) > NetClientState *ncs[MAX_QUEUE_NUM]; > int queues, i; > =20 > + assert(nc->info->type !=3D NET_CLIENT_OPTIONS_KIND_NIC); > + > /* If the NetClientState belongs to a multiqueue backend, we will ch= ange all > * other NetClientStates also. > */ > @@ -355,8 +357,6 @@ void qemu_del_net_client(NetClientState *nc) > return; > } > =20 > - assert(nc->info->type !=3D NET_CLIENT_OPTIONS_KIND_NIC); > - > for (i =3D 0; i < queues; i++) { > qemu_cleanup_net_client(ncs[i]); > qemu_free_net_client(ncs[i]); The assert can be dropped completely since the code already has an equivalent assert: queues =3D qemu_find_net_clients_except(nc->name, ncs, NET_CLIENT_OPTIONS_KIND_NIC, MAX_QUEUE_NUM); assert(queues !=3D 0); <-- fail if type =3D=3D NET_CLIENT_OPTIONS_KIND_NIC --hdW7zL/qDS6RXdAL Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUpqYCAAoJEJykq7OBq3PIhREIAJJuh5C7UdeYcbo2E3JxQlpJ ds6AWuqt67zGMbdYQCaFIyjOC3gzNdBAqXT+kw2NKSWO/C4FnffLQj8Wux3XfeB3 lz+w8cRalGBBfVr2NA+OIzznfH5CavWfSTi4ewdGLY3KL5Fb+oSCiXtIRgQ3L2zz SzJvZtlLXt1EHT8pTJnEZlo7hdrTIhTb2/U4xXLd5J9O7htMPA7Jz0TqQKx05Fnd zfkEXOKBDAp1uZrAp0iBaftI95kTtLlgR8DyHwt1BRhDSmwKQAUT46G+X0FPJSFr FjOuKTpmCcyAysmxBp9UJBZciQBQjclAr6AFvJC3gb9gN5Wlc1XumS40cfblTpo= =vPFq -----END PGP SIGNATURE----- --hdW7zL/qDS6RXdAL--