From patchwork Sat May 7 10:50:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 764322 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p47Ap4iI004684 for ; Sat, 7 May 2011 10:51:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754718Ab1EGKvB (ORCPT ); Sat, 7 May 2011 06:51:01 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:37149 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754690Ab1EGKvA (ORCPT ); Sat, 7 May 2011 06:51:00 -0400 Received: by wya21 with SMTP id 21so2922937wya.19 for ; Sat, 07 May 2011 03:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=xhDIqieiFL5DCRmbsrSAKuTbh3IPTjmutB7b+hfnrMI=; b=KtEuKI9GPjoJ5XCkuACGPV8wq6p5tJbrSBMFcTnR2ZPEn137IfrGa5jIjle0r7tzUJ qAkS+F4vd85O63ku/uIMwbYX+s2IQg8dy4ICAkOF0GmMyBjgDe5M3jhEGXppybWxRz73 j4n9RFwkaw/ZZ2RHpMKDerXcA2Zkn2IDVgU2M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=ALk4RsRGEZGWeqtkg0EGNYxfFmvlz1/rTV3Qt+NAxT3olT46hhl3c0kAbQAqF4WVhz aRw3/y/ErBgMpfqDySWmJkzgCbLKDLSsEJmPxgW+zzUUE3nwb8GrbXMv4u30Z0n9oLPY AzPaj8Bt6DON43xdmfXV7QBUXqv1mDlYHbIHk= Received: by 10.216.61.135 with SMTP id w7mr580446wec.19.1304765459088; Sat, 07 May 2011 03:50:59 -0700 (PDT) Received: from localhost.localdomain (bzq-79-176-199-19.red.bezeqint.net [79.176.199.19]) by mx.google.com with ESMTPS id m84sm1216244weq.36.2011.05.07.03.50.57 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 07 May 2011 03:50:58 -0700 (PDT) From: Sasha Levin To: penberg@kernel.org Cc: mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com, prasadjoshi124@gmail.com, kvm@vger.kernel.org, Sasha Levin Subject: [PATCH] kvm tools: Rename pci_device to pci_hdr for clarity Date: Sat, 7 May 2011 13:50:45 +0300 Message-Id: <1304765445-14496-1-git-send-email-levinsasha928@gmail.com> X-Mailer: git-send-email 1.7.5.rc3 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.6 (demeter2.kernel.org [140.211.167.43]); Sat, 07 May 2011 10:51:04 +0000 (UTC) Signed-off-by: Sasha Levin --- tools/kvm/virtio/blk.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/kvm/virtio/blk.c b/tools/kvm/virtio/blk.c index accfc3e..cc3dc78 100644 --- a/tools/kvm/virtio/blk.c +++ b/tools/kvm/virtio/blk.c @@ -45,7 +45,7 @@ struct blk_dev { struct virt_queue vqs[NUM_VIRT_QUEUES]; struct blk_dev_job jobs[NUM_VIRT_QUEUES]; - struct pci_device_header pci_device; + struct pci_device_header pci_hdr; }; static struct blk_dev *bdevs[VIRTIO_BLK_MAX_DEV]; @@ -103,7 +103,7 @@ static bool virtio_blk_pci_io_in(struct kvm *self, u16 port, void *data, int siz break; case VIRTIO_PCI_ISR: ioport__write8(data, 0x1); - kvm__irq_line(self, bdev->pci_device.irq_line, 0); + kvm__irq_line(self, bdev->pci_hdr.irq_line, 0); break; case VIRTIO_MSI_CONFIG_VECTOR: ioport__write16(data, bdev->config_vector); @@ -167,7 +167,7 @@ static void virtio_blk_do_io(struct kvm *kvm, void *param) while (virt_queue__available(vq)) virtio_blk_do_io_request(kvm, bdev, vq); - kvm__irq_line(kvm, bdev->pci_device.irq_line, 1); + kvm__irq_line(kvm, bdev->pci_hdr.irq_line, 1); } static bool virtio_blk_pci_io_out(struct kvm *self, u16 port, void *data, int size, u32 count) @@ -283,7 +283,7 @@ void virtio_blk__init(struct kvm *self, struct disk_image *disk) .blk_config = (struct virtio_blk_config) { .capacity = disk->size / SECTOR_SIZE, }, - .pci_device = (struct pci_device_header) { + .pci_hdr = (struct pci_device_header) { .vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET, .device_id = PCI_DEVICE_ID_VIRTIO_BLK, .header_type = PCI_HEADER_TYPE_NORMAL, @@ -298,10 +298,10 @@ void virtio_blk__init(struct kvm *self, struct disk_image *disk) if (irq__register_device(PCI_DEVICE_ID_VIRTIO_BLK, &dev, &pin, &line) < 0) return; - bdev->pci_device.irq_pin = pin; - bdev->pci_device.irq_line = line; + bdev->pci_hdr.irq_pin = pin; + bdev->pci_hdr.irq_line = line; - pci__register(&bdev->pci_device, dev); + pci__register(&bdev->pci_hdr, dev); ioport__register(blk_dev_base_addr, &virtio_blk_io_ops, IOPORT_VIRTIO_BLK_SIZE); }