From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFwta-0008GY-0O for qemu-devel@nongnu.org; Mon, 17 Oct 2011 19:47:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFwtY-0006ZQ-S6 for qemu-devel@nongnu.org; Mon, 17 Oct 2011 19:47:01 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:35909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFwtY-0006YO-GE for qemu-devel@nongnu.org; Mon, 17 Oct 2011 19:47:00 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate01.web.de (Postfix) with ESMTP id B9AC719E2807C for ; Mon, 17 Oct 2011 21:56:42 +0200 (CEST) Message-ID: <4E9C7EE3.9050603@web.de> Date: Mon, 17 Oct 2011 21:15:47 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20111017134349.GD6406@redhat.com> In-Reply-To: <20111017134349.GD6406@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFD977C601EA7AB6B28EC5F38" Subject: Re: [Qemu-devel] [RFC][PATCH 11/45] msi: Factor out delivery hook List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Alex Williamson , Marcelo Tosatti , Avi Kivity , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFD977C601EA7AB6B28EC5F38 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-10-17 15:43, Michael S. Tsirkin wrote: > On Mon, Oct 17, 2011 at 11:27:45AM +0200, Jan Kiszka wrote: >> diff --git a/hw/msi.c b/hw/msi.c >> index 3c7ebc3..9055155 100644 >> --- a/hw/msi.c >> +++ b/hw/msi.c >> @@ -40,6 +40,14 @@ >> /* Flag for interrupt controller to declare MSI/MSI-X support */ >> bool msi_supported; >> =20 >> +static void msi_unsupported(MSIMessage *msg) >> +{ >> + /* If we get here, the board failed to register a delivery handle= r. */ >> + abort(); >> +} >> + >> +void (*msi_deliver)(MSIMessage *msg) =3D msi_unsupported; >> + >=20 > How about we set this to NULL, and check it instead of the bool > flag? >=20 Yeah. I will introduce bool msi_supported(void) { return msi_deliver !=3D msi_unsupported; } OK? Jan --------------enigFD977C601EA7AB6B28EC5F38 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6cfuMACgkQitSsb3rl5xQexgCg1hqZcdCKjWJTfY4y+KGStNiV LckAn3muFusKfyuPR8J/YlG1bPssMJGG =z57z -----END PGP SIGNATURE----- --------------enigFD977C601EA7AB6B28EC5F38--