qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <weiyang@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: anthony@codemonkey.ws, qemu-devel@nongnu.org, gleb@redhat.com
Subject: Re: [Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device()
Date: Sat, 24 Aug 2013 10:34:06 +0800	[thread overview]
Message-ID: <20130824023400.GA6314@weiyang.vnet.ibm.com> (raw)
In-Reply-To: <1377250793-24027-10-git-send-email-pbonzini@redhat.com>

Paolo,

Sorry, maybe I am not familiar with the patch format in qemu-dev.

I didn't see the From: Wei Yang in this one neither.

On Fri, Aug 23, 2013 at 11:39:53AM +0200, Paolo Bonzini wrote:
>get_real_device() has 5 parameters with the last 4 is contained in the first
>structure.
>
>This patch removes the last 4 parameters and directly use them from the first
>parameter.
>
>Acked-by: Alex Williamson <alex.williamson@redhat.com>
>Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>---
> hw/i386/kvm/pci-assign.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
>diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
>index ff33dc8..73941b2 100644
>--- a/hw/i386/kvm/pci-assign.c
>+++ b/hw/i386/kvm/pci-assign.c
>@@ -568,8 +568,7 @@ static int get_real_device_id(const char *devpath, uint16_t *val)
>     return get_real_id(devpath, "device", val);
> }
>
>-static int get_real_device(AssignedDevice *pci_dev, uint16_t r_seg,
>-                           uint8_t r_bus, uint8_t r_dev, uint8_t r_func)
>+static int get_real_device(AssignedDevice *pci_dev)
> {
>     char dir[128], name[128];
>     int fd, r = 0, v;
>@@ -582,7 +581,8 @@ static int get_real_device(AssignedDevice *pci_dev, uint16_t r_seg,
>     dev->region_number = 0;
>
>     snprintf(dir, sizeof(dir), "/sys/bus/pci/devices/%04x:%02x:%02x.%x/",
>-             r_seg, r_bus, r_dev, r_func);
>+             pci_dev->host.domain, pci_dev->host.bus,
>+             pci_dev->host.slot, pci_dev->host.function);
>
>     snprintf(name, sizeof(name), "%sconfig", dir);
>
>@@ -1769,8 +1769,7 @@ static int assigned_initfn(struct PCIDevice *pci_dev)
>     memcpy(dev->emulate_config_write, dev->emulate_config_read,
>            sizeof(dev->emulate_config_read));
>
>-    if (get_real_device(dev, dev->host.domain, dev->host.bus,
>-                        dev->host.slot, dev->host.function)) {
>+    if (get_real_device(dev)) {
>         error_report("pci-assign: Error: Couldn't get real device (%s)!",
>                      dev->dev.qdev.id);
>         goto out;
>-- 
>1.8.3.1

-- 
Richard Yang
Help you, Help me

  reply	other threads:[~2013-08-24  2:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23  9:39 [Qemu-devel] [PULL 0/9] KVM changes for 2013-08-23 Paolo Bonzini
2013-08-23  9:39 ` [Qemu-devel] [PULL 1/9] Initialize IA32_FEATURE_CONTROL MSR in reset and migration Paolo Bonzini
2013-08-23 10:10   ` Andreas Färber
2013-08-23 10:11     ` Paolo Bonzini
2013-08-23  9:39 ` [Qemu-devel] [PULL 2/9] target-i386: remove tabs from target-i386/cpu.h Paolo Bonzini
2013-08-23  9:39 ` [Qemu-devel] [PULL 3/9] kvm: migrate vPMU state Paolo Bonzini
2013-08-23  9:39 ` [Qemu-devel] [PULL 4/9] kvm: add KVM_IRQFD_FLAG_RESAMPLE support Paolo Bonzini
2013-08-23  9:39 ` [Qemu-devel] [PULL 5/9] kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled Paolo Bonzini
2013-08-23  9:39 ` [Qemu-devel] [PULL 6/9] kvm: Simplify kvm_handle_io Paolo Bonzini
2013-08-23  9:39 ` [Qemu-devel] [PULL 7/9] kvm-all.c: max_cpus should not exceed KVM vcpu limit Paolo Bonzini
2013-08-23  9:39 ` [Qemu-devel] [PULL 8/9] kvm: i386: fix LAPIC TSC deadline timer save/restore Paolo Bonzini
2013-08-23  9:39 ` [Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device() Paolo Bonzini
2013-08-24  2:34   ` Wei Yang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-08-24  3:55 [Qemu-devel] [PULL v2 0/9] KVM changes for 2013-08-23 Paolo Bonzini
2013-08-24  3:55 ` [Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device() Paolo Bonzini
2013-08-24  3:49 [Qemu-devel] [PULL 0/9] KVM changes for 2013-08-23 Paolo Bonzini
2013-08-24  3:50 ` [Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device() Paolo Bonzini
2013-08-23  9:03 [Qemu-devel] [PULL 0/9] KVM changes for 2013-08-23 Paolo Bonzini
2013-08-23  9:03 ` [Qemu-devel] [PULL 9/9] kvm: shorten the parameter list for get_real_device() Paolo Bonzini
2013-08-23  9:37   ` Wei Yang
2013-08-23  9:37     ` Paolo Bonzini

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=20130824023400.GA6314@weiyang.vnet.ibm.com \
    --to=weiyang@linux.vnet.ibm.com \
    --cc=anthony@codemonkey.ws \
    --cc=gleb@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).