qemu/hw/char
Philippe Mathieu-Daudé 083b266f69 chardev: Use QEMUChrEvent enum in IOEventHandler typedef
The Chardev events are listed in the QEMUChrEvent enum.

By using the enum in the IOEventHandler typedef we:

- make the IOEventHandler type more explicit (this handler
  process out-of-band information, while the IOReadHandler
  is in-band),
- help static code analyzers.

This patch was produced with the following spatch script:

  @match@
  expression backend, opaque, context, set_open;
  identifier fd_can_read, fd_read, fd_event, be_change;
  @@
  qemu_chr_fe_set_handlers(backend, fd_can_read, fd_read, fd_event,
                           be_change, opaque, context, set_open);

  @depends on match@
  identifier opaque, event;
  identifier match.fd_event;
  @@
   static
  -void fd_event(void *opaque, int event)
  +void fd_event(void *opaque, QEMUChrEvent event)
   {
   ...
   }

Then the typedef was modified manually in
include/chardev/char-fe.h.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20191218172009.8868-15-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-01-08 11:15:35 +01:00
..
bcm2835_aux.c hw/arm/bcm2835_peripherals: Improve logging 2019-10-15 18:09:05 +01:00
cadence_uart.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
cmsdk-apb-uart.c Include migration/vmstate.h less 2019-08-16 13:31:52 +02:00
debugcon.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
digic-uart.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
escc.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
etraxfs_ser.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
exynos4210_uart.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
grlib_apbuart.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
imx_serial.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
ipoctal232.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
Kconfig hw/char: Move multi-serial devices into separate file 2019-05-17 15:19:39 +02:00
lm32_juart.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
lm32_uart.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
Makefile.objs hw/char: Move multi-serial devices into separate file 2019-05-17 15:19:39 +02:00
mcf_uart.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
milkymist-uart.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
nrf51_uart.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
omap_uart.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
parallel-isa.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
parallel.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
pl011.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
sclpconsole-lm.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
sclpconsole.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
serial-isa.c Include sysemu/sysemu.h a lot less 2019-08-16 13:31:53 +02:00
serial-pci-multi.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
serial-pci.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
serial.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
sh_serial.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
spapr_vty.c spapr: Replace spapr_vio_qirq() helper with spapr_vio_irq_pulse() helper 2019-10-04 19:08:22 +10:00
stm32f2xx_usart.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
terminal3270.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
trace-events trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00
virtio-console.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
virtio-serial-bus.c virtio: basic packed virtqueue support 2019-10-25 07:46:22 -04:00
xen_console.c Include sysemu/sysemu.h a lot less 2019-08-16 13:31:53 +02:00
xilinx_uartlite.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00