[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 037/126] hw/qdev: Constify DeviceState* argument of qdev_get_paren
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 037/126] hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus() |
Date: |
Mon, 27 Feb 2023 15:00:44 +0100 |
The structure is accessed read-only by qdev_get_parent_bus().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230212224730.51438-2-philmd@linaro.org>
---
hw/core/qdev.c | 2 +-
include/hw/qdev-core.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index d759c4602c..43d863b0c5 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -330,7 +330,7 @@ bool qdev_machine_modified(void)
return qdev_hot_added || qdev_hot_removed;
}
-BusState *qdev_get_parent_bus(DeviceState *dev)
+BusState *qdev_get_parent_bus(const DeviceState *dev)
{
return dev->parent_bus;
}
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 35fddb19a6..f5b3b2f89a 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -715,7 +715,7 @@ static inline void qdev_init_gpio_in_named(DeviceState *dev,
void qdev_pass_gpios(DeviceState *dev, DeviceState *container,
const char *name);
-BusState *qdev_get_parent_bus(DeviceState *dev);
+BusState *qdev_get_parent_bus(const DeviceState *dev);
/*** BUS API. ***/
--
2.38.1
- [PULL 027/126] accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation, (continued)
- [PULL 027/126] accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 030/126] sysemu/kvm: Remove CONFIG_USER_ONLY guard, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 029/126] accel/kvm: Silent -Wmissing-field-initializers warning, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 028/126] accel/xen: Remove dead code, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 031/126] replay: Extract core API to 'exec/replay-core.h', Philippe Mathieu-Daudé, 2023/02/27
- [PULL 032/126] tests/unit: Restrict machine-smp.c test to system emulation, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 033/126] softmmu: Silent -Wmissing-field-initializers warning, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 035/126] qemu/typedefs: Sort in case-insensitive alphabetical order (again), Philippe Mathieu-Daudé, 2023/02/27
- [PULL 034/126] softmmu: Extract watchpoint API from physmem.c, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 036/126] hw/nubus/nubus-device: Fix memory leak in nubus_device_realize, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 037/126] hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus(),
Philippe Mathieu-Daudé <=
- [PULL 038/126] hw/cpu: Extend CPUState::cluster_index documentation, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 039/126] hw/i386/x86: Reduce init_topo_info() scope, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 040/126] hw/i386/ich9: Rename Q35_MASK to ICH9_MASK, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 041/126] hw/isa/lpc_ich9: Unexport PIRQ functions, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 042/126] hw/isa/lpc_ich9: Eliminate ICH9LPCState::isa_bus, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 043/126] hw/i2c/smbus_ich9: Move ich9_smb_set_irq() in front of ich9_smbus_realize(), Philippe Mathieu-Daudé, 2023/02/27
- [PULL 044/126] hw/i2c/smbus_ich9: Inline ich9_smb_init() and remove it, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 045/126] hw/i386/pc_q35: Allow for setting properties before realizing TYPE_ICH9_LPC_DEVICE, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 047/126] hw/isa/lpc_ich9: Remove redundant ich9_lpc_reset() invocation, Philippe Mathieu-Daudé, 2023/02/27
- [PULL 046/126] hw/isa/lpc_ich9: Connect PM stuff to LPC internally, Philippe Mathieu-Daudé, 2023/02/27