qemu-e2k/hw/usb
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
..
bus.c
ccid-card-emulated.c
ccid-card-passthru.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
ccid.h
chipidea.c
combined-packet.c
core.c
desc-msos.c
desc.c
desc.h
dev-audio.c usbaudio: change playback counters to 64 bit 2019-10-18 08:14:05 +02:00
dev-hid.c
dev-hub.c
dev-mtp.c usb-mtp: add sanity checks on rootdir 2019-08-29 07:31:12 +02:00
dev-network.c hw/usb: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
dev-serial.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
dev-smartcard-reader.c
dev-storage.c
dev-uas.c
dev-wacom.c
hcd-ehci-pci.c
hcd-ehci-sysbus.c
hcd-ehci.c ehci: fix queue->dev null ptr dereference 2019-08-22 06:55:29 +02:00
hcd-ehci.h
hcd-musb.c
hcd-ohci-pci.c
hcd-ohci.c
hcd-ohci.h
hcd-uhci.c
hcd-xhci-nec.c
hcd-xhci.c xhci: Fix memory leak in xhci_kick_epctx 2019-08-29 07:30:04 +02:00
hcd-xhci.h
host-libusb.c usb-host: add option to allow all resets. 2019-11-06 13:26:04 +01:00
host-stub.c
host.h
Kconfig hw/usb: Remove the USB bluetooth dongle device 2019-12-16 17:24:07 +01:00
libhw.c
Makefile.objs hw/usb/redirect: Do not link 'usb-redir' device when USB not enabled 2020-01-07 12:08:39 +01:00
quirks-ftdi-ids.h
quirks-pl2303-ids.h
quirks.c
quirks.h
redirect.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
trace-events
tusb6010.c
xen-usb.c