mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
Replace uses of FROM_SSI_SLAVE() macro with QOM casts
The FROM_SSI_SLAVE() macro predates QOM and is used as a typesafe way to cast from an SSISlave* to the instance struct of a subtype of TYPE_SSI_SLAVE. Switch to using the QOM cast macros instead, which have the same effect (by writing the QOM macros if the types were previously missing them.) (The FROM_SSI_SLAVE() macro allows the SSISlave member of the subtype's struct to be anywhere as long as it is named "ssidev", whereas a QOM cast macro insists that it is the first thing in the subtype's struct. This is true for all the types we convert here.) This removes all the uses of FROM_SSI_SLAVE() so we can delete the definition. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20200628142429.17111-18-peter.maydell@linaro.org
This commit is contained in:
parent
62a4d34020
commit
213f63df77
5 changed files with 22 additions and 14 deletions
|
@ -66,8 +66,6 @@ struct SSISlave {
|
|||
bool cs;
|
||||
};
|
||||
|
||||
#define FROM_SSI_SLAVE(type, dev) DO_UPCAST(type, ssidev, dev)
|
||||
|
||||
extern const VMStateDescription vmstate_ssi_slave;
|
||||
|
||||
#define VMSTATE_SSI_SLAVE(_field, _state) { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue