@samitouri / QOSamiQemu / commits / f9aea61a19

qdev: Make qdev_is_realized() take a const DeviceState *

qdev_is_realized() only reads DeviceState. Make its parameter const so a later caller with a const DeviceState * can use it. Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260721-qdev-v3-2-d2e226fa002e@rsg.ci.i.u-tokyo.ac.jp>

Akihiko Odaki committed Jul 21, 2026 at 17:16 UTC f9aea61a19ee54be962daafdd10da2ea8f5f1aa8
1 file changed +1 -1
include/hw/core/qdev.h
+1 -1
@@ -437,7 +437,7 @@ DeviceState *qdev_try_new(const char *name);
437 * Context: May be called outside big qemu lock.
438 * Return: true if the device has been fully constructed, false otherwise.
439 */
440 -static inline bool qdev_is_realized(DeviceState *dev)
440 +static inline bool qdev_is_realized(const DeviceState *dev)
441 {
442 return qatomic_load_acquire(&dev->realized);
443 }