Skip to content

chardev: Use QEMUChrEvent enum in IOEventHandler typedef

Philippe Mathieu-Daudé qemu-arm qemu-devel qemu-riscv qemu-trivial 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest14 patches 13 repliesIn review
  2. v114 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- do blindly ignore all events using a 'default' case.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14hw/ipmi: Remove unnecessary declarationshw/ipmi/ipmi_bmc_extern.c+0 -40 replies
2/14hw/ipmi: Explicit we ignore some QEMUChrEvent in IOEventHandlerhw/ipmi/ipmi_bmc_extern.c+6 -03 replies
3/14hw/char/terminal3270: Explicit ignored QEMUChrEvent in IOEventHandlerhw/char/terminal3270.c+5 -01 reply
4/14hw/usb/dev-serial: Explicit we ignore few QEMUChrEvent in IOEventHandlerhw/usb/dev-serial.c+4 -00 replies
5/14hw/usb/redirect: Explicit we ignore few QEMUChrEvent in IOEventHandlerhw/usb/redirect.c+5 -00 replies
6/14ccid-card-passthru: Explicit we ignore QEMUChrEvent in IOEventHandlerhw/usb/ccid-card-passthru.c+5 -00 replies
7/14vhost-user-crypto: Explicit we ignore some QEMUChrEvent in IOEventHandlerbackends/cryptodev-vhost-user.c+5 -00 replies
8/14vhost-user-net: Explicit we ignore few QEMUChrEvent in IOEventHandlernet/vhost-user.c+5 -01 reply
9/14vhost-user-blk: Explicit we ignore few QEMUChrEvent in IOEventHandlerhw/block/vhost-user-blk.c+5 -01 reply
10/14virtio-console: Explicit we ignore some QEMUChrEvent in IOEventHandlerhw/char/virtio-console.c+5 -01 reply
11/14monitor/qmp: Explicit we ignore few QEMUChrEvent in IOEventHandlermonitor/qmp.c+5 -01 reply
12/14monitor/hmp: Explicit we ignore a QEMUChrEvent in IOEventHandlermonitor/hmp.c+4 -00 replies
13/14chardev/char: Explicit we ignore some QEMUChrEvent in IOEventHandlerchardev/char.c+5 -00 replies
14/14chardev: Use QEMUChrEvent enum in IOEventHandler typedefbackends/cryptodev-vhost-user.c chardev/char-mux.c chardev/char.c +41 more+52 -523 replies

Reviews trailers per patch

9 of 14 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchCorey MinyardDr. David Alan GilbertRichard HendersonCornelia HuckMichael S. TsirkinMarkus ArmbrusterMarc-André Lureau
SeriesR-b
1/14A-b
2/14A-b R-b
3/14R-b
4/14
5/14
6/14
7/14
8/14R-b
9/14A-b
10/14A-b
11/14R-b
12/14A-b
13/14
14/14A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef

Hi,

After this chat on #qemu IRC:
13:20 <stsquad> so what is the difference between a IOReadHandler and IOEventHandler? 13:25 <f4bug> stsquad: one is in-band and the other out-of-band?
13:26 <stsquad> f4bug: ahh yes it seems so - connect/disconnect etc... 13:27 <f4bug> see QEMUChrEvent for IOEventHandler

I thought it might be a good opportunity to make the IOEventHandler typedef meaning more obvious, by using the QEMUChrEvent enum.

To be able to build I had to explicit all enums ignored in the switch(event) statement by these frontends.

Then I used a coccinelle spatch to change the various IOEventHandler. I don't think the last patch can be split, but suggestions are welcome!

Regards,

Phil.

v2:
- do blindly ignore all events using a 'default' case.

Philippe Mathieu-Daudé (14):
hw/ipmi: Remove unnecessary declarations
hw/ipmi: Explicit we ignore some QEMUChrEvent in IOEventHandler hw/char/terminal3270: Explicit ignored QEMUChrEvent in IOEventHandler hw/usb/dev-serial: Explicit we ignore few QEMUChrEvent in IOEventHandler hw/usb/redirect: Explicit we ignore few QEMUChrEvent in IOEventHandler
ccid-card-passthru: Explicit we ignore QEMUChrEvent in IOEventHandler
vhost-user-crypto: Explicit we ignore some QEMUChrEvent in IOEventHandler
vhost-user-net: Explicit we ignore few QEMUChrEvent in IOEventHandler
vhost-user-blk: Explicit we ignore few QEMUChrEvent in IOEventHandler
virtio-console: Explicit we ignore some QEMUChrEvent in IOEventHandler monitor/qmp: Explicit we ignore few QEMUChrEvent in IOEventHandler monitor/hmp: Explicit we ignore a QEMUChrEvent in IOEventHandler chardev/char: Explicit we ignore some QEMUChrEvent in IOEventHandler
chardev: Use QEMUChrEvent enum in IOEventHandler typedef

 include/chardev/char-fe.h       |  2 +-
 include/chardev/char-mux.h      |  2 +-
 include/chardev/char.h          |  4 ++--
 backends/cryptodev-vhost-user.c |  7 ++++++-
 chardev/char-mux.c              |  8 ++++----
 chardev/char.c                  |  9 +++++++--
 gdbstub.c                       |  2 +-
 hw/arm/pxa2xx.c                 |  2 +-
 hw/arm/strongarm.c              |  2 +-
 hw/block/vhost-user-blk.c       |  7 ++++++-
 hw/char/cadence_uart.c          |  2 +-
 hw/char/digic-uart.c            |  2 +-
 hw/char/escc.c                  |  2 +-
 hw/char/etraxfs_ser.c           |  2 +-
 hw/char/exynos4210_uart.c       |  2 +-
 hw/char/grlib_apbuart.c         |  2 +-
 hw/char/imx_serial.c            |  2 +-
 hw/char/ipoctal232.c            |  2 +-
 hw/char/lm32_juart.c            |  2 +-
 hw/char/lm32_uart.c             |  2 +-
 hw/char/mcf_uart.c              |  2 +-
 hw/char/milkymist-uart.c        |  2 +-
 hw/char/nrf51_uart.c            |  2 +-
 hw/char/pl011.c                 |  2 +-
 hw/char/serial.c                |  2 +-
 hw/char/sh_serial.c             |  2 +-
 hw/char/terminal3270.c          |  7 ++++++-
 hw/char/virtio-console.c        |  7 ++++++-
 hw/char/xilinx_uartlite.c       |  2 +-
 hw/ipmi/ipmi_bmc_extern.c       | 12 +++++++-----
 hw/mips/boston.c                |  2 +-
 hw/mips/mips_malta.c            |  2 +-
 hw/riscv/riscv_htif.c           |  2 +-
 hw/riscv/sifive_uart.c          |  2 +-
 hw/usb/ccid-card-passthru.c     |  7 ++++++-
 hw/usb/dev-serial.c             |  6 +++++-
 hw/usb/redirect.c               |  7 ++++++-
 monitor/hmp.c                   |  6 +++++-
 monitor/qmp.c                   |  7 ++++++-
 net/filter-mirror.c             |  2 +-
 net/vhost-user.c                |  9 +++++++--
 qtest.c                         |  2 +-
 tests/test-char.c               |  6 +++---
 tests/vhost-user-test.c         |  2 +-
 44 files changed, 111 insertions(+), 56 deletions(-)
Cc "Gonglei (Arei)" <[email protected]>
Cc "Marc-André Lureau" <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc "Alex Bennée" <[email protected]>
Cc "Philippe Mathieu-Daudé" <[email protected]>
Cc Andrzej Zaborowski <[email protected]>
Cc Peter Maydell <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Kevin Wolf <[email protected]>
Cc Max Reitz <[email protected]>
Cc "Edgar E. Iglesias" <[email protected]>
Cc Alistair Francis <[email protected]>
Cc Antony Pavlov <[email protected]>
Cc Igor Mitsyanko <[email protected]>
Cc Fabien Chouteau <[email protected]>
Cc KONRAD Frederic <[email protected]>
Cc Peter Chubb <[email protected]>
Cc Alberto Garcia <[email protected]>
Cc Michael Walle <[email protected]>
Cc Thomas Huth <[email protected]>
Cc Joel Stanley <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Halil Pasic <[email protected]>
Cc Christian Borntraeger <[email protected]>
Cc Laurent Vivier <[email protected]>
Cc Amit Shah <[email protected]>
Cc Corey Minyard <[email protected]>
Cc Paul Burton <[email protected]>
Cc Aleksandar Rikalo <[email protected]>
Cc Aurelien Jarno <[email protected]>
Cc Aleksandar Markovic <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Sagar Karandikar <[email protected]>
Cc Bastian Koppelmann <[email protected]>
Cc Gerd Hoffmann <[email protected]>
Cc Samuel Thibault <[email protected]>
Cc "Dr. David Alan Gilbert" <[email protected]>
Cc Markus Armbruster <[email protected]>
Cc Zhang Chen <[email protected]>
Cc Li Zhijian <[email protected]>
Cc Jason Wang <[email protected]>
Signature · 1 line
2.21.0