mbox series

[0/9] hw/usb: Cleanups around QOM style

Message ID 20230220150515.32549-1-philmd@linaro.org
Headers show
Series hw/usb: Cleanups around QOM style | expand

Message

Philippe Mathieu-Daudé Feb. 20, 2023, 3:05 p.m. UTC
- Use QOM's OBJECT_DECLARE*TYPE() to declare typedef / macros
- Use QOM cast macros instead of container_of()

Philippe Mathieu-Daudé (9):
  hw/usb/dev-smartcard-reader: Avoid forward-declaring CCIDBus
  hw/usb/hcd-ohci: Use OHCIState type definition
  hw/usb/hcd-ohci-pci: Use QOM type-safe cast conversion macro
  hw/usb/hcd-uhci: Declare QOM macros using OBJECT_DECLARE_TYPE()
  hw/usb/hcd-uhci: Replace container_of() by UHCI_GET_CLASS() QOM macro
  hw/usb/hcd-xhci-nec: Declare QOM macros for NEC_XHCI
  hw/usb/hcd-xhci-nec: Replace container_of() by NEC_XHCI() QOM cast
    macro
  hw/usb/u2f: Declare QOM macros using OBJECT_DECLARE_TYPE()
  hw/usb/u2f-passthru: Use QOM type-safe cast conversion macros

 hw/usb/dev-smartcard-reader.c |  7 +++----
 hw/usb/hcd-ohci-pci.c         |  4 ++--
 hw/usb/hcd-ohci.c             |  2 +-
 hw/usb/hcd-ohci.h             | 10 ++++++----
 hw/usb/hcd-uhci.c             |  7 ++-----
 hw/usb/hcd-uhci.h             |  2 +-
 hw/usb/hcd-xhci-nec.c         |  8 +++++---
 hw/usb/u2f-passthru.c         |  7 ++++---
 hw/usb/u2f.h                  | 16 +++++-----------
 9 files changed, 29 insertions(+), 34 deletions(-)