From: Sasha Levin <levinsasha928@gmail.com>
To: Asias He <asias.hejun@gmail.com>
Cc: penberg@kernel.org, mingo@elte.hu, gorcunov@gmail.com,
prasadjoshi124@gmail.com, kvm@vger.kernel.org
Subject: Re: [PATCH] kvm tools: Rename pci_device to pci_hdr for clarity
Date: Mon, 09 May 2011 14:23:36 +0300 [thread overview]
Message-ID: <1304940216.12850.21.camel@lappy> (raw)
In-Reply-To: <4DC7C36C.9060204@gmail.com>
On Mon, 2011-05-09 at 18:35 +0800, Asias He wrote:
> On 05/07/2011 06:50 PM, Sasha Levin wrote:
> > Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
> > ---
> > 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);
> > }
>
> Does this renaming apply to other devices as well? Mind to send followup
> patches?
>
No, It was virtio-blk specific.
I named the var pci_device when I've added multiple virtio-blk device
support.
--
Sasha.
prev parent reply other threads:[~2011-05-09 11:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-07 10:50 [PATCH] kvm tools: Rename pci_device to pci_hdr for clarity Sasha Levin
2011-05-09 10:35 ` Asias He
2011-05-09 11:23 ` Sasha Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304940216.12850.21.camel@lappy \
--to=levinsasha928@gmail.com \
--cc=asias.hejun@gmail.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=penberg@kernel.org \
--cc=prasadjoshi124@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.