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 target/*helper: don't check retaddr before calling cpu_restore_state 2017-12-27 17:20:44 -08:00
cpu-reset.cocci cpu: Use DeviceClass reset instead of a special CPUClass reset 2020-03-17 19:48:10 -04:00
device-reset.cocci hw: Define new device_class_set_legacy_reset() 2024-09-13 15:31:44 +01:00
err-bad-newline.cocci coccinelle/err-bad-newline: Fix for Python 3, and add patterns 2020-07-24 12:56:44 +02:00
error_propagate_null.cocci error: Remove NULL checks on error_propagate() calls 2016-06-20 16:38:13 +02:00
error-use-after-free.cocci scripts/coccinelle: add error-use-after-free.cocci 2020-04-04 14:14:09 +02:00
errp-guard.cocci scripts: Coccinelle script to use ERRP_GUARD() 2020-07-10 15:18:09 +02:00
exec_rw_const.cocci Avoid cpu_physical_memory_rw() with a constant is_write argument 2020-02-20 14:47:08 +01:00
inplace-byteswaps.cocci coccinelle: new inplace-byteswaps.cocci to remove inplace-byteswapping calls 2018-10-16 17:14:55 +01:00
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 scripts: add muldiv64() checking coccinelle scripts 2016-06-07 18:02:49 +03:00
qobject.cocci qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREF 2018-05-04 08:27:53 +02:00
qom-parent-type.cocci qom: fix objects with improper parent type 2020-10-12 11:50:22 -04:00
remove_local_err.cocci error: Remove unnecessary local_err variables 2016-06-20 16:38:13 +02:00
remove_muldiv64.cocci scripts: add muldiv64() checking coccinelle scripts 2016-06-07 18:02:49 +03:00
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 coccinelle: use macro DIV_ROUND_UP instead of (((n) + (d) - 1) /(d)) 2016-06-07 18:19:24 +03:00
simplify_muldiv64.cocci scripts: add muldiv64() checking coccinelle scripts 2016-06-07 18:02:49 +03:00
swap_muldiv64.cocci scripts: add muldiv64() checking coccinelle scripts 2016-06-07 18:02:49 +03:00
tcg_gen_extract.cocci qemu-iotests: convert pwd and $(pwd) to $PWD 2018-11-19 10:08:19 -06:00
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 coccinelle: add a script to remove useless casts 2016-09-15 15:32:22 +03:00
use-error_fatal.cocci Use error_fatal to simplify obvious fatal errors (again) 2018-10-19 14:51:34 +02:00
use-g_new-etc.cocci scripts/coccinelle: New use-g_new-etc.cocci 2022-03-21 15:44:44 +01:00