From patchwork Sun Jun 20 16:21:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 107057 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5KGMHWC031826 for ; Sun, 20 Jun 2010 16:22:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753718Ab0FTQWN (ORCPT ); Sun, 20 Jun 2010 12:22:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57709 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752412Ab0FTQWA (ORCPT ); Sun, 20 Jun 2010 12:22:00 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5KGM0fv012353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 20 Jun 2010 12:22:00 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5KGLx87012629 for ; Sun, 20 Jun 2010 12:21:59 -0400 Received: from file.tlv.redhat.com (file.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id D8D08250ADB; Sun, 20 Jun 2010 19:21:58 +0300 (IDT) From: Avi Kivity To: Marcelo Tosatti Cc: kvm@vger.kernel.org Subject: [PATCH 2/4] KVM: i8259: simplify pic_irq_request() calling sequence Date: Sun, 20 Jun 2010 19:21:56 +0300 Message-Id: <1277050918-12744-3-git-send-email-avi@redhat.com> In-Reply-To: <1277050918-12744-1-git-send-email-avi@redhat.com> References: <1277050918-12744-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 20 Jun 2010 16:22:17 +0000 (UTC) diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index caf6e1b..bc10f0b 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c @@ -176,10 +176,7 @@ static void pic_update_irq(struct kvm_pic *s) pic_set_irq1(&s->pics[0], 2, 0); } irq = pic_get_irq(&s->pics[0]); - if (irq >= 0) - pic_irq_request(s->kvm, 1); - else - pic_irq_request(s->kvm, 0); + pic_irq_request(s->kvm, irq >= 0); } void kvm_pic_update_irq(struct kvm_pic *s)