qemu/hw/mips
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
..
addr.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
boston.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
cps.c target/mips: Style improvements in cps.c 2019-08-19 19:53:37 +02:00
gt64xxx_pci.c hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
Kconfig hw/isa: Introduce a CONFIG_ISA_SUPERIO switch for isa-superio.c 2019-10-04 18:49:16 +02:00
Makefile.objs hw/mips/Makefile.objs: Create CONFIG_* for r4k, malta, mipssim boards 2019-02-05 16:50:19 +01:00
mips_fulong2e.c hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
mips_int.c mips: fix memory leaks in board initialization 2019-10-04 18:49:17 +02:00
mips_jazz.c hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
mips_malta.c chardev: Use QEMUChrEvent enum in IOEventHandler typedef 2020-01-08 11:15:35 +01:00
mips_mipssim.c target/mips: Style improvements in mips_mipssim.c 2019-08-19 19:53:37 +02:00
mips_r4k.c hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
trace-events hw/mips/gt64xxx: Remove dynamic field width from trace events 2019-11-19 14:46:01 +01:00