Received: from eggs.gnu.org ([140.186.70.92]:42940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUguO-00049G-RK for qemu-devel@nongnu.org; Thu, 09 Jun 2011 11:12:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUguM-0007e2-Vp for qemu-devel@nongnu.org; Thu, 09 Jun 2011 11:12:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUguM-0007df-77 for qemu-devel@nongnu.org; Thu, 09 Jun 2011 11:12:30 -0400 From: Markus Armbruster References: <4DEF2F25.5070104@redhat.com> <1307559319-16183-1-git-send-email-andreas.faerber@web.de> <1307559319-16183-2-git-send-email-andreas.faerber@web.de> <1307559319-16183-3-git-send-email-andreas.faerber@web.de> <1307559319-16183-4-git-send-email-andreas.faerber@web.de> <1307559319-16183-5-git-send-email-andreas.faerber@web.de> <1307559319-16183-6-git-send-email-andreas.faerber@web.de> Date: Thu, 09 Jun 2011 17:12:26 +0200 In-Reply-To: (Markus Armbruster's message of "Thu, 09 Jun 2011 17:04:03 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC v4 05/12] isa: Allow to un-associate an IRQ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: hpoussin@reactos.org, qemu-devel@nongnu.org, kraxel@redhat.com Markus Armbruster writes: > Andreas F=C3=A4rber writes: > >> Signed-off-by: Andreas F=C3=A4rber >> --- >> hw/isa-bus.c | 14 ++++++++++++++ >> hw/isa.h | 1 + >> 2 files changed, 15 insertions(+), 0 deletions(-) >> >> diff --git a/hw/isa-bus.c b/hw/isa-bus.c >> index 1f64673..6ac3e61 100644 >> --- a/hw/isa-bus.c >> +++ b/hw/isa-bus.c >> @@ -80,6 +80,20 @@ void isa_init_irq(ISADevice *dev, qemu_irq *p, int is= airq) >> dev->nirqs++; >> } >>=20=20 >> +void isa_discard_irq(ISADevice *dev, int isairq) >> +{ >> + int i, j; >> + for (i =3D 0; i < dev->nirqs; i++) { >> + if (dev->isairq[i] =3D=3D isairq) { >> + for (j =3D i + 1; j < dev->nirqs; j++) { >> + dev->isairq[j - 1] =3D dev->isairq[j]; >> + } >> + dev->nirqs--; >> + break; >> + } >> + } >> +} > > Comment to 04/12 applies. Sorry, misleading. The comment about the naming applies. The comment about the use of the function doesn't apply: isa_init_irq() does the complete job, unlike isa_init_ioport_range(). Your isa_discard_irq() keeps the qemu_irq that was set by isa_init_irq() around, which is perhaps not perfectly clean, but should work. > [...]