[Qemu-devel] [PATCH v3 0/4] qdev: remove DeviceClass::init/exit()

Philippe Mathieu-Daudé posted 4 patches 6 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180419212727.26095-1-f4bug@amsat.org
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test s390x passed
There is a newer version of this series
include/hw/i2c/i2c.h    |  3 ---
include/hw/i2c/smbus.h  |  1 -
include/hw/qdev-core.h  |  4 ----
hw/audio/wm8750.c       |  8 +++-----
hw/core/qdev.c          | 28 ----------------------------
hw/core/sysbus.c        | 15 ++++++++++-----
hw/display/ssd0303.c    |  9 ++++-----
hw/gpio/max7310.c       |  9 ++++-----
hw/i2c/core.c           | 13 -------------
hw/i2c/smbus.c          |  9 ---------
hw/i2c/smbus_eeprom.c   |  5 ++---
hw/input/lm832x.c       |  9 ++++-----
hw/misc/tmp105.c        |  7 +++----
hw/misc/tmp421.c        |  8 +++-----
hw/nvram/eeprom_at24c.c | 24 +++++++++++-------------
hw/timer/twl92230.c     | 11 ++++-------
16 files changed, 48 insertions(+), 115 deletions(-)
[Qemu-devel] [PATCH v3 0/4] qdev: remove DeviceClass::init/exit()
Posted by Philippe Mathieu-Daudé 6 years ago
Since v2:
  - rebased for 2.13 (Markus)
  - dropped 2 patches already merged (Gerd)
  - start sentences with a capital letter and end with a full stop (Peter)

since v1:
  - fix format string on 32-bit host (patchew)
  - do not add smbus_eeprom_reset() (Eduardo)
  - directly use DeviceClass::realize (Eduardo)
  - squashed 2 patches (Eduardo)

Hi,

This series finalize the qdev QOMification.

We first convert the I2CSlave/SMBusDevice,
then the usb-ccid and virtio-ccw,
and finally the SysBusDevice.

At the end we removed *TWO* TODO :)

    /* TODO remove, once users are converted to realize */
    /* TODO remove, once users are converted to unrealize */

Regards,

Phil.

Philippe Mathieu-Daudé (4):
  hw/i2c/smbus: Use DeviceClass::realize instead of SMBusDeviceClass::init
  hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init
  qdev: Simplify the SysBusDeviceClass::init path
  qdev: Remove DeviceClass::exit

 include/hw/i2c/i2c.h    |  3 ---
 include/hw/i2c/smbus.h  |  1 -
 include/hw/qdev-core.h  |  4 ----
 hw/audio/wm8750.c       |  8 +++-----
 hw/core/qdev.c          | 28 ----------------------------
 hw/core/sysbus.c        | 15 ++++++++++-----
 hw/display/ssd0303.c    |  9 ++++-----
 hw/gpio/max7310.c       |  9 ++++-----
 hw/i2c/core.c           | 13 -------------
 hw/i2c/smbus.c          |  9 ---------
 hw/i2c/smbus_eeprom.c   |  5 ++---
 hw/input/lm832x.c       |  9 ++++-----
 hw/misc/tmp105.c        |  7 +++----
 hw/misc/tmp421.c        |  8 +++-----
 hw/nvram/eeprom_at24c.c | 24 +++++++++++-------------
 hw/timer/twl92230.c     | 11 ++++-------
 16 files changed, 48 insertions(+), 115 deletions(-)

-- 
2.17.0


Re: [Qemu-devel] [PATCH v3 0/4] qdev: remove DeviceClass::init/exit()
Posted by Philippe Mathieu-Daudé 6 years ago
On 04/19/2018 06:27 PM, Philippe Mathieu-Daudé wrote:
> Since v2:
>   - rebased for 2.13 (Markus)
>   - dropped 2 patches already merged (Gerd)
>   - start sentences with a capital letter and end with a full stop (Peter)

I forgot to put the backport-diff, in case someone already reviewed v2:

[----] : patches are identical
The flags [FC] indicate (F)unctional and (C)ontextual differences,
respectively

001/4:[----] [--] 'hw/i2c/smbus: use DeviceClass::realize instead of
SMBusDeviceClass::init'
002/4:[----] [-C] 'hw/i2c: use DeviceClass::realize instead of
I2CSlaveClass::init'
003/4:[----] [-C] 'qdev: simplify the SysBusDeviceClass::init path'
004/4:[----] [-C] 'qdev: remove DeviceClass::exit'


> since v1:
>   - fix format string on 32-bit host (patchew)
>   - do not add smbus_eeprom_reset() (Eduardo)
>   - directly use DeviceClass::realize (Eduardo)
>   - squashed 2 patches (Eduardo)