hw: Fix abuse of QOM class internals modified by their instances
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | hw/mips/jazz: Fix modifying QOM class internal state from instancehw/ | +23 | 1 reply | |
| 2/3 | hw/ppc/e500plat: Fix modifying QOM class internal state from instancehw/ | +11 | 2 replies | |
| 3/3 | hw/i2c/pmbus_device: Fix modifying QOM class internals from instancehw/ | +10 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Bernhard Beschow | Richard Henderson |
|---|---|---|
| 1/3 | Inspired-by | R-b |
| 2/3 | Inspired-by | R-b |
| 3/3 | Inspired-by | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] hw: Fix abuse of QOM class internals modified by their instances
Bernhard warned for QOM class abuse here [*]:
Quoted 5 lines
A realize method is supposed to modify a single instance only while we're modifying the behavior of whole classes here, i.e. will affect every instance of these classes. This goes against QOM design principles and will therefore be confusing for people who are familiar with QOM in particular and OOP in general.
This series fixes the cases I found while auditing.
[*] https://lore.kernel.org/qemu-devel/[email protected]/
Philippe Mathieu-Daudé (3):
hw/mips/jazz: Fix modifying QOM class internal state from instance hw/ppc/e500plat: Fix modifying QOM class internal state from instance hw/i2c/pmbus_device: Fix modifying QOM class internals from instance
hw/i2c/pmbus_device.c | 17 ++++++++++------- hw/mips/jazz.c | 41 +++++++++++++++++++++++------------------ hw/ppc/e500plat.c | 25 +++++++++++-------------- 3 files changed, 44 insertions(+), 39 deletions(-)
Signature · 1 line
2.38.1