mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
hw/pci/pci: Remove multifunction parameter from pci_new_multifunction()
There is also pci_new() which creates non-multifunction PCI devices. Accordingly the parameter is always set to true when a multi function PCI device is to be created. The reason for the parameter's existence seems to be that it is used in the internal PCI code as well which is the only location where it gets set to false. This one usage can be resolved by factoring out an internal helper function. Remove this redundant, error-prone parameter. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Message-Id: <20230304114043.121024-6-shentey@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
e052944a96
commit
c925f40a29
5 changed files with 17 additions and 16 deletions
|
@ -577,8 +577,7 @@ pci_set_quad_by_mask(uint8_t *config, uint64_t mask, uint64_t reg)
|
|||
pci_set_quad(config, (~mask & val) | (mask & rval));
|
||||
}
|
||||
|
||||
PCIDevice *pci_new_multifunction(int devfn, bool multifunction,
|
||||
const char *name);
|
||||
PCIDevice *pci_new_multifunction(int devfn, const char *name);
|
||||
PCIDevice *pci_new(int devfn, const char *name);
|
||||
bool pci_realize_and_unref(PCIDevice *dev, PCIBus *bus, Error **errp);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue