qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/3] hw: Fix abuse of QOM class internals modified by their insta


From: Philippe Mathieu-Daudé
Subject: [PATCH 0/3] hw: Fix abuse of QOM class internals modified by their instances
Date: Tue, 23 May 2023 08:44:05 +0200

Bernhard warned for QOM class abuse here [*]:

> 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/0DAAC63B-0C0F-44C4-B7EB-ACD6C9A36BF1@gmail.com/

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(-)

-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]