pci: make sure pci_bus_is_express() won't error out with "discards ‘const’ qualifier"
function doesn't need RW aceess to passed in bus pointer, make it const. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20230112140312.3096331-31-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
6c36ec46b0
commit
c6f1647195
@ -483,7 +483,7 @@ static void pci_bus_uninit(PCIBus *bus)
|
||||
pci_host_bus_unregister(BUS(bus)->parent);
|
||||
}
|
||||
|
||||
bool pci_bus_is_express(PCIBus *bus)
|
||||
bool pci_bus_is_express(const PCIBus *bus)
|
||||
{
|
||||
return object_dynamic_cast(OBJECT(bus), TYPE_PCIE_BUS);
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ typedef void (*pci_bus_dev_fn)(PCIBus *b, PCIDevice *d, void *opaque);
|
||||
typedef void (*pci_bus_fn)(PCIBus *b, void *opaque);
|
||||
typedef void *(*pci_bus_ret_fn)(PCIBus *b, void *opaque);
|
||||
|
||||
bool pci_bus_is_express(PCIBus *bus);
|
||||
bool pci_bus_is_express(const PCIBus *bus);
|
||||
|
||||
void pci_root_bus_init(PCIBus *bus, size_t bus_size, DeviceState *parent,
|
||||
const char *name,
|
||||
|
Loading…
Reference in New Issue
Block a user