Received: from eggs.gnu.org ([2001:4830:134:3::10]:51569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1ObB-0001ep-R7 for qemu-devel@nongnu.org; Tue, 24 Nov 2015 20:10:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1Ob7-0002TW-62 for qemu-devel@nongnu.org; Tue, 24 Nov 2015 20:10:17 -0500 References: <1448284752-18538-1-git-send-email-caoj.fnst@cn.fujitsu.com> <5654ACD7.9090303@gmail.com> From: Cao jin Message-ID: <56550A85.1090103@cn.fujitsu.com> Date: Wed, 25 Nov 2015 09:10:29 +0800 MIME-Version: 1.0 In-Reply-To: <5654ACD7.9090303@gmail.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] PCI Trivial: remove superfluous code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcel@redhat.com, qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, mst@redhat.com On 11/25/2015 02:30 AM, Marcel Apfelbaum wrote: > 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 >> --- >> 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. > uh..sorry, my mistake. You remind me... I miss the "auto assign" condition. Please forget this patch... > 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, >> > > -- Yours Sincerely, Cao Jin -- This message has been scanned for viruses and dangerous content by Fujitsu, and is believed to be clean.