qemu/scripts/coccinelle
Peter Maydell 134e0944f4 hw: Define new device_class_set_legacy_reset()
Define a device_class_set_legacy_reset() function which
sets the DeviceClass::reset field. This serves two purposes:
 * it makes it clearer to the person writing code that
   DeviceClass::reset is now legacy and they should look for
   the new alternative (which is Resettable)
 * it makes it easier to rename the reset field (which in turn
   makes it easier to find places that call it)

The Coccinelle script can be used to automatically convert code that
was doing an open-coded assignment to DeviceClass::reset to call
device_class_set_legacy_reset() instead.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240830145812.1967042-7-peter.maydell@linaro.org
2024-09-13 15:31:44 +01:00
..
cpu_restore_state.cocci
cpu-reset.cocci
device-reset.cocci hw: Define new device_class_set_legacy_reset() 2024-09-13 15:31:44 +01:00
err-bad-newline.cocci
error_propagate_null.cocci
error-use-after-free.cocci
errp-guard.cocci
exec_rw_const.cocci
inplace-byteswaps.cocci
memory-region-housekeeping.cocci softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate() 2021-06-15 20:27:38 +02:00
overflow_muldiv64.cocci
qobject.cocci
qom-parent-type.cocci
remove_local_err.cocci
remove_muldiv64.cocci
reset-type.cocci scripts/coccinelle: New script to add ResetType to hold and exit phases 2024-04-25 10:21:06 +01:00
return_directly.cocci cleanup: Tweak and re-run return_directly.cocci 2022-12-14 16:19:35 +01:00
round.cocci
simplify_muldiv64.cocci
swap_muldiv64.cocci
tcg_gen_extract.cocci
timer-del-timer-free.cocci scripts/coccinelle: New script to remove unnecessary timer_del() calls 2021-01-08 15:13:38 +00:00
typecast.cocci
use-error_fatal.cocci
use-g_new-etc.cocci scripts/coccinelle: New use-g_new-etc.cocci 2022-03-21 15:44:44 +01:00