[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 40/56] pci: make sure pci_bus_is_express() won't error out with "d
From: |
Michael S. Tsirkin |
Subject: |
[PULL 40/56] pci: make sure pci_bus_is_express() won't error out with "discards ‘const’ qualifier" |
Date: |
Mon, 30 Jan 2023 15:20:56 -0500 |
From: Igor Mammedov <imammedo@redhat.com>
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>
---
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 85ee458cd2..d5a40cd058 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 39a7bb32aa..208c16f450 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -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);
}
--
MST
- [PULL 33/56] tests: acpi: update expected blobs, (continued)
- [PULL 33/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 38/56] pci: acpi: wire up AcpiDevAmlIf interface to generic bridge, Michael S. Tsirkin, 2023/01/30
- [PULL 35/56] tests: acpi: add endpoint devices to bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 26/56] tests: acpi: add reboot cycle to bridge test, Michael S. Tsirkin, 2023/01/30
- [PULL 55/56] Revert "vhost-user: Introduce nested event loop in vhost_user_read()", Michael S. Tsirkin, 2023/01/30
- [PULL 45/56] tests: acpi: whitelist DSDT blobs before removing dynamic _DSM on coldplugged bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 37/56] x86: pcihp: acpi: prepare slot ignore rule to work with self describing bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 46/56] pcihp: acpi: ignore coldplugged bridges when composing hotpluggable slots, Michael S. Tsirkin, 2023/01/30
- [PULL 25/56] tests: boot_sector_test(): make it multi-shot, Michael S. Tsirkin, 2023/01/30
- [PULL 43/56] pcihp: acpi: decouple hotplug and generic slots description, Michael S. Tsirkin, 2023/01/30
- [PULL 40/56] pci: make sure pci_bus_is_express() won't error out with "discards ‘const’ qualifier",
Michael S. Tsirkin <=
- [PULL 32/56] pcihp: do not put empty PCNT in DSDT, Michael S. Tsirkin, 2023/01/30
- [PULL 34/56] whitelist DSDT before adding endpoint devices to bridge testcases, Michael S. Tsirkin, 2023/01/30
- [PULL 36/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 39/56] pcihp: make bridge describe itself using AcpiDevAmlIfClass:build_dev_aml, Michael S. Tsirkin, 2023/01/30
- [PULL 53/56] tests/qtest/bios-tables-test: Make the test less verbose by default, Michael S. Tsirkin, 2023/01/30
- [PULL 47/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 49/56] pcihp: generate populated non-hotpluggble slot descriptions on non-hotplug path, Michael S. Tsirkin, 2023/01/30
- [PULL 41/56] pcihp: isolate rule whether slot should be described in DSDT, Michael S. Tsirkin, 2023/01/30
- [PULL 42/56] tests: acpi: whitelist DSDT before decoupling PCI hotplug code from basic slots description, Michael S. Tsirkin, 2023/01/30
- [PULL 51/56] vhost-user: Skip unnecessary duplicated VHOST_USER_ADD/REM_MEM_REG requests, Michael S. Tsirkin, 2023/01/30