From patchwork Fri Jun 14 10:50:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 251331 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7B3AF2C007A for ; Fri, 14 Jun 2013 20:52:58 +1000 (EST) Received: from localhost ([::1]:59868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnRcl-00070Z-Ks for incoming@patchwork.ozlabs.org; Fri, 14 Jun 2013 06:52:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnRan-0004ne-J3 for qemu-devel@nongnu.org; Fri, 14 Jun 2013 06:50:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnRak-0004H6-Un for qemu-devel@nongnu.org; Fri, 14 Jun 2013 06:50:53 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:59449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnRak-0004GQ-9A; Fri, 14 Jun 2013 06:50:50 -0400 Received: from gandalf.tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id 632F741664; Fri, 14 Jun 2013 14:50:49 +0400 (MSK) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id 4389750A; Fri, 14 Jun 2013 14:50:47 +0400 (MSK) From: Michael Tokarev To: Anthony Liguori Date: Fri, 14 Jun 2013 14:50:21 +0400 Message-Id: <1371207042-17980-6-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1371207042-17980-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1371207042-17980-1-git-send-email-mjt@msgid.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, Peter Crosthwaite , Michael Tokarev , qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 05/26] intc/xilinx_intc: Use qemu_set_irq X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Crosthwaite Use qemu_set_irq rather than if-elsing qemu_irq_(lower|raise). No functional change, just reduces verbosity. Cc: qemu-trivial@nongnu.org Signed-off-by: Peter Crosthwaite Signed-off-by: Michael Tokarev --- hw/intc/xilinx_intc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c index b106e72..5df7008 100644 --- a/hw/intc/xilinx_intc.c +++ b/hw/intc/xilinx_intc.c @@ -66,11 +66,7 @@ static void update_irq(struct xlx_pic *p) i = ~0; p->regs[R_IVR] = i; - if ((p->regs[R_MER] & 1) && p->regs[R_IPR]) { - qemu_irq_raise(p->parent_irq); - } else { - qemu_irq_lower(p->parent_irq); - } + qemu_set_irq(p->parent_irq, (p->regs[R_MER] & 1) && p->regs[R_IPR]); } static uint64_t