From patchwork Wed Oct 27 14:30:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 69347 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EC5AAB6EF2 for ; Wed, 27 Oct 2010 23:44:14 +1100 (EST) Received: from localhost ([127.0.0.1]:37471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PB5MR-0004Lt-5j for incoming@patchwork.ozlabs.org; Wed, 27 Oct 2010 08:44:11 -0400 Received: from [140.186.70.92] (port=40354 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PB5Db-0000cj-GH for qemu-devel@nongnu.org; Wed, 27 Oct 2010 08:35:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PB59E-0005Gn-RF for qemu-devel@nongnu.org; Wed, 27 Oct 2010 08:33:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PB59E-0005GO-HK for qemu-devel@nongnu.org; Wed, 27 Oct 2010 08:30:32 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9RCUVFC016281 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 27 Oct 2010 08:30:31 -0400 Received: from redhat.com (vpn-6-133.tlv.redhat.com [10.35.6.133]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id o9RCUSrt008716; Wed, 27 Oct 2010 08:30:29 -0400 Date: Wed, 27 Oct 2010 16:30:03 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org, yamahata@valinux.co.jp Message-ID: <20101027143003.GA3843@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] msi: minor cleanups X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Comment fixup (tell what it does not what it does not do), typo fix, whitespace fix. Signed-off-by: Michael S. Tsirkin --- hw/msi.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/msi.c b/hw/msi.c index 016e7a4..f03f519 100644 --- a/hw/msi.c +++ b/hw/msi.c @@ -155,9 +155,8 @@ int msi_init(struct PCIDevice *dev, uint8_t offset, pci_set_word(dev->wmask + msi_data_off(dev, msi64bit), 0xffff); if (msi_per_vector_mask) { + /* Make mask bits 0 to nr_vectors - 1 writeable. */ pci_set_long(dev->wmask + msi_mask_off(dev, msi64bit), - /* (1U << nr_vectors) - 1 is undefined - when nr_vectors = 32 */ 0xffffffff >> (PCI_MSI_VECTORS_MAX - nr_vectors)); } return config_offset; @@ -225,7 +224,7 @@ void msi_notify(PCIDevice *dev, unsigned int vector) return; } - if (msi64bit){ + if (msi64bit) { address = pci_get_quad(dev->config + msi_address_lo_off(dev)); } else { address = pci_get_long(dev->config + msi_address_lo_off(dev)); @@ -269,7 +268,7 @@ void msi_write_config(PCIDevice *dev, uint32_t addr, uint32_t val, int len) flags, pci_get_long(dev->config + msi_address_lo_off(dev))); if (msi64bit) { - fprintf(stderr, " addrss-hi: 0x%"PRIx32, + fprintf(stderr, " address-hi: 0x%"PRIx32, pci_get_long(dev->config + msi_address_hi_off(dev))); } fprintf(stderr, " data: 0x%"PRIx16,