summaryrefslogtreecommitdiffstats
path: root/hw/core/bus.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2020-05-12 09:00:19 +0200
committerMarkus Armbruster2020-05-15 07:08:14 +0200
commit688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6 (patch)
tree98137bc80565df6a363847506617f177167122c3 /hw/core/bus.c
parenttarget: Remove unnecessary CPU() cast (diff)
downloadqemu-688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6.tar.gz
qemu-688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6.tar.xz
qemu-688ffbb4f72bf9a75c7ff3a899a9617de61d5fd6.zip
various: Remove unnecessary OBJECT() cast
The OBJECT() macro is defined as: #define OBJECT(obj) ((Object *)(obj)) Remove the unnecessary OBJECT() casts when we already know the pointer is of Object type. Patch created mechanically using spatch with this script: @@ typedef Object; Object *o; @@ - OBJECT(o) + o Acked-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Corey Minyard <cminyard@mvista.com> Acked-by: John Snow <jsnow@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200512070020.22782-3-f4bug@amsat.org> [Trivial rebase conflict in hw/s390x/sclp.c resolved]
Diffstat (limited to 'hw/core/bus.c')
-rw-r--r--hw/core/bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/bus.c b/hw/core/bus.c
index a9e4118d3c..50924793ac 100644
--- a/hw/core/bus.c
+++ b/hw/core/bus.c
@@ -25,7 +25,7 @@
void qbus_set_hotplug_handler(BusState *bus, Object *handler, Error **errp)
{
- object_property_set_link(OBJECT(bus), OBJECT(handler),
+ object_property_set_link(OBJECT(bus), handler,
QDEV_HOTPLUG_HANDLER_PROPERTY, errp);
}