OSDN Git Service

hw/pci/pci: Remove multifunction parameter from pci_new_multifunction()
authorBernhard Beschow <shentey@gmail.com>
Sat, 4 Mar 2023 11:40:43 +0000 (12:40 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 10 Jul 2023 22:59:32 +0000 (18:59 -0400)
commitc925f40a29906355b516bad4c6ef80d30cf971b6
tree5effb1d00a4dc0d639cd5658ed61c0f5e50b6a24
parente052944a966ca4eb0131121646fa0ef047c25e52
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>
hw/i386/pc_q35.c
hw/pci-host/sabre.c
hw/pci/pci.c
hw/sparc64/sun4u.c
include/hw/pci/pci.h