qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
To: Cao jin <caoj.fnst@cn.fujitsu.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, mst@redhat.com
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] PCI Trivial: remove superfluous code
Date: Tue, 24 Nov 2015 20:30:47 +0200	[thread overview]
Message-ID: <5654ACD7.9090303@gmail.com> (raw)
In-Reply-To: <1448284752-18538-1-git-send-email-caoj.fnst@cn.fujitsu.com>

On 11/23/2015 03:19 PM, Cao jin wrote:
> remove superfluous code in do_pci_register_device(). See its caller:
> pci_qdev_realize()
>
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
> ---
>   hw/pci/pci.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 168b9cc..4d16da0 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -878,7 +878,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,
>          return NULL;
>       }
>
> -    pci_dev->devfn = devfn;

Hi, can you please explain why this line is not needed?
As far as I see if do_pci_register_device is called with devfn -1 (auto assign),
the devfn will be computed by this function and then passed to pci_dev.

Am I missing anything?

Thanks,
Marcel


>       dma_as = pci_device_iommu_address_space(pci_dev);
>
>       memory_region_init_alias(&pci_dev->bus_master_enable_region,
>

  reply	other threads:[~2015-11-24 18:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 13:19 [Qemu-devel] [PATCH] PCI Trivial: remove superfluous code Cao jin
2015-11-24 18:30 ` Marcel Apfelbaum [this message]
2015-11-25  1:10   ` [Qemu-devel] [Qemu-trivial] " Cao jin

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=5654ACD7.9090303@gmail.com \
    --to=marcel.apfelbaum@gmail.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).