PCI Trivial: remove superfluous code
PATCH 1/1 PCI Trivial: remove superfluous code
remove superfluous code in do_pci_register_device(). See its caller:pci_qdev_realize()
--- hw/pci/pci.c | 1 - 1 file changed, 1 deletion(-)
hw/pci/pci.c +0 -1
@@ -878,7 +878,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus,return NULL ; } - pci_dev->devfn = devfn; dma_as =pci_device_iommu_address_space (pci_dev); memory_region_init_alias(&pci_dev->bus_master_enable_region,
Signature · 7 lines
2.1.0 -- This message has been scanned for viruses and dangerous content by FCNIC, and is believed to be clean.
Quoted 13 lines · Cao jin
remove superfluous code in
do_pci_register_device(). See its caller:pci_qdev_realize()Signed-off-by Cao jin <[email protected]>--- hw/pci/pci.c | 1 - 1 file changed, 1 deletion(-)hw/pci/pci.c +0
-0
hw/pci/pci.c static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, · line 881
Quoted 4 lines
hw/pci/pci.c +0
-1@@ -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
Quoted 4 lines
hw/pci/pci.c +0
-0dma_as =pci_device_iommu_address_space (pci_dev); memory_region_init_alias(&pci_dev->bus_master_enable_region,
Quoted 18 lines · Marcel Apfelbaum
Quoted 17 lines · Cao jin
remove superfluous code in
do_pci_register_device(). See its caller:pci_qdev_realize()Signed-off-by Cao jin <[email protected]>--- hw/pci/pci.c | 1 - 1 file changed, 1 deletion(-)hw/pci/pci.c +0
-0@@ -878,7 +878,6 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, return NULL; }
Quoted 7 lines
hw/pci/pci.c static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCIBus *bus, · line 881
Quoted 1 line
hw/pci/pci.c +0
-1- pci_dev->devfn = devfn;Hi, can you please explain why this line is not needed?
As far as I see ifdo_pci_register_deviceis called with devfn -1 (auto assign),
the devfn will be computed by this function and then passed topci_dev.
uh..sorry, my mistake. You remind me... I miss the "auto assign" condition. Please forget this patch...
Quoted 12 lines
Am I missing anything?
Thanks,
MarcelQuoted 4 lines
hw/pci/pci.c +0
-0dma_as =pci_device_iommu_address_space (pci_dev);memory_region_init_alias(&pci_dev->bus_master_enable_region,
Signature · 7 lines
Yours Sincerely, Cao Jin -- This message has been scanned for viruses and dangerous content by Fujitsu, and is believed to be clean.