From patchwork Sun Jul 5 15:48:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 34153 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n65FmPAe021351 for ; Sun, 5 Jul 2009 15:48:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752607AbZGEPsO (ORCPT ); Sun, 5 Jul 2009 11:48:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752574AbZGEPsO (ORCPT ); Sun, 5 Jul 2009 11:48:14 -0400 Received: from mx2.redhat.com ([66.187.237.31]:45597 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752258AbZGEPsN (ORCPT ); Sun, 5 Jul 2009 11:48:13 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n65FmHaG031672 for ; Sun, 5 Jul 2009 11:48:17 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n65FmGad005546; Sun, 5 Jul 2009 11:48:16 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n65FmDW9004727; Sun, 5 Jul 2009 11:48:13 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id EA52718D478; Sun, 5 Jul 2009 18:48:12 +0300 (IDT) From: Gleb Natapov To: avi@redhat.com Cc: kvm@vger.kernel.org Subject: [PATCH 2/2] Use temporary variable to shorten lines. Date: Sun, 5 Jul 2009 18:48:12 +0300 Message-Id: <1246808892-2179-2-git-send-email-gleb@redhat.com> In-Reply-To: <1246808892-2179-1-git-send-email-gleb@redhat.com> References: <1246808892-2179-1-git-send-email-gleb@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Cosmetic only. No logical is changed by this patch. Signed-off-by: Gleb Natapov --- virt/kvm/ioapic.c | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 8a9c6cc..202c405 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c @@ -116,29 +116,33 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val) case IOAPIC_REG_ARB_ID: break; - default: + default: { + union kvm_ioapic_redirect_entry *e; + index = (ioapic->ioregsel - 0x10) >> 1; ioapic_debug("change redir index %x val %x\n", index, val); if (index >= IOAPIC_NUM_PINS) return; - mask_before = ioapic->redirtbl[index].fields.mask; + e = &ioapic->redirtbl[index]; + mask_before = e->fields.mask; if (ioapic->ioregsel & 1) { - ioapic->redirtbl[index].bits &= 0xffffffff; - ioapic->redirtbl[index].bits |= (u64) val << 32; + e->bits &= 0xffffffff; + e->bits |= (u64) val << 32; } else { - ioapic->redirtbl[index].bits &= ~0xffffffffULL; - ioapic->redirtbl[index].bits |= (u32) val; - ioapic->redirtbl[index].fields.remote_irr = 0; + e->bits &= ~0xffffffffULL; + e->bits |= (u32) val; + e->fields.remote_irr = 0; } - mask_after = ioapic->redirtbl[index].fields.mask; + mask_after = e->fields.mask; if (mask_before != mask_after) kvm_fire_mask_notifiers(ioapic->kvm, index, mask_after); - if (ioapic->redirtbl[index].fields.trig_mode == IOAPIC_LEVEL_TRIG + if (e->fields.trig_mode == IOAPIC_LEVEL_TRIG && ioapic->irr & (1 << index)) ioapic_service(ioapic, index); break; } + } } static int ioapic_deliver(struct kvm_ioapic *ioapic, int irq)