From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [RFC][PATCH 11/45] msi: Factor out delivery hook Date: Mon, 17 Oct 2011 21:15:47 +0200 Message-ID: <4E9C7EE3.9050603@web.de> References: <20111017134349.GD6406@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFD977C601EA7AB6B28EC5F38" Cc: Alex Williamson , Marcelo Tosatti , Avi Kivity , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" To: "Michael S. Tsirkin" Return-path: In-Reply-To: <20111017134349.GD6406@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.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--