summaryrefslogtreecommitdiffstats
path: root/hw/core/bus.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2020-05-12 09:00:18 +0200
committerMarkus Armbruster2020-05-15 07:08:14 +0200
commit96449e4a30a56e3303d6d0407aca130c71671754 (patch)
tree7b89cb76afd183356f59d4935a7d887b9c232422 /hw/core/bus.c
parentqom: Drop @errp parameter of object_property_del() (diff)
downloadqemu-96449e4a30a56e3303d6d0407aca130c71671754.tar.gz
qemu-96449e4a30a56e3303d6d0407aca130c71671754.tar.xz
qemu-96449e4a30a56e3303d6d0407aca130c71671754.zip
target: Remove unnecessary CPU() cast
The CPU() macro is defined as: #define CPU(obj) ((CPUState *)(obj)) which expands to: ((CPUState *)object_dynamic_cast_assert((Object *)(obj), (name), __FILE__, __LINE__, __func__)) This assertion can only fail when @obj points to something other than its stated type, i.e. when we're in undefined behavior country. Remove the unnecessary CPU() casts when we already know the pointer is of CPUState type. Patch created mechanically using spatch with this script: @@ typedef CPUState; CPUState *s; @@ - CPU(s) + s Acked-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200512070020.22782-2-f4bug@amsat.org>
Diffstat (limited to 'hw/core/bus.c')
0 files changed, 0 insertions, 0 deletions