[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 30/40] pci: make sure pci_bus_is_express() won't error out with
From: |
Igor Mammedov |
Subject: |
[PATCH 30/40] pci: make sure pci_bus_is_express() won't error out with "discards ‘const’ qualifier" |
Date: |
Thu, 12 Jan 2023 15:03:02 +0100 |
function doesn't need RW aceess to passed in bus pointer,
make it const.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
include/hw/pci/pci.h | 2 +-
hw/pci/pci.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 7048a373d1..03e8d614ad 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -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,
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index c2fb88f9a3..e725a771e3 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -482,7 +482,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);
}
--
2.31.1
- [PATCH 12/40] x86: pcihp: fix invalid AML PCNT calls to hotplugged bridges, (continued)
- [PATCH 12/40] x86: pcihp: fix invalid AML PCNT calls to hotplugged bridges, Igor Mammedov, 2023/01/12
- [PATCH 22/40] pcihp: do not put empty PCNT in DSDT, Igor Mammedov, 2023/01/12
- [PATCH 06/40] tests: acpi: cleanup use_uefi argument usage, Igor Mammedov, 2023/01/12
- [PATCH 17/40] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery, Igor Mammedov, 2023/01/12
- [PATCH 19/40] tests: acpi: update expected blobs, Igor Mammedov, 2023/01/12
- [PATCH 10/40] pcihp: piix4: do not call acpi_pcihp_reset() when ACPI PCI hotplug is disabled, Igor Mammedov, 2023/01/12
- [PATCH 29/40] pcihp: make bridge describe itself using AcpiDevAmlIfClass:build_dev_aml, Igor Mammedov, 2023/01/12
- [PATCH 01/40] tests: qtest: print device_add error before failing test, Igor Mammedov, 2023/01/12
- [PATCH 20/40] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery, Igor Mammedov, 2023/01/12
- [PATCH 25/40] tests: acpi: add endpoint devices to bridges, Igor Mammedov, 2023/01/12
- [PATCH 30/40] pci: make sure pci_bus_is_express() won't error out with "discards ‘const’ qualifier",
Igor Mammedov <=
- [PATCH 36/40] pcihp: acpi: ignore coldplugged bridges when composing hotpluggable slots, Igor Mammedov, 2023/01/12
- [PATCH 26/40] tests: acpi: update expected blobs, Igor Mammedov, 2023/01/12
- [PATCH 32/40] tests: acpi: whitelist DSDT before decoupling PCI hotplug code from basic slots description, Igor Mammedov, 2023/01/12
- [PATCH 37/40] tests: acpi: update expected blobs, Igor Mammedov, 2023/01/12
- [PATCH 39/40] pcihp: generate populated non-hotpluggble slot descriptions on non-hotplug path, Igor Mammedov, 2023/01/12
- [PATCH 16/40] tests: acpi: add reboot cycle to bridge test, Igor Mammedov, 2023/01/12
- [PATCH 23/40] tests: acpi: update expected blobs, Igor Mammedov, 2023/01/12
- [PATCH 13/40] tests: boot_sector_test: avoid crashing if status is not available yet, Igor Mammedov, 2023/01/12
- [PATCH 28/40] pci: acpi: wire up AcpiDevAmlIf interface to generic bridge, Igor Mammedov, 2023/01/12
- [PATCH 21/40] pcihp: compose PCNT callchain right before its user _GPE._E01, Igor Mammedov, 2023/01/12