qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Sagar Karandikar" <sagark@eecs.berkeley.edu>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	qemu-devel@nongnu.org,
	"KONRAD Frederic" <frederic.konrad@adacore.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Paul Burton" <pburton@wavecomp.com>,
	"Alberto Garcia" <berto@igalia.com>,
	"Li Zhijian" <lizhijian@cn.fujitsu.com>,
	qemu-block@nongnu.org, "Zhang Chen" <chen.zhang@intel.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Gonglei (Arei)" <arei.gonglei@huawei.com>,
	"Antony Pavlov" <antonynpavlov@gmail.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Aleksandar Rikalo" <aleksandar.rikalo@rt-rk.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Corey Minyard" <minyard@acm.org>, "Amit Shah" <amit@kernel.org>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Fabien Chouteau" <chouteau@adacore.com>,
	qemu-s390x@nongnu.org, qemu-arm@nongnu.org,
	"Peter Chubb" <peter.chubb@nicta.com.au>,
	"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Kevin Wolf" <kwolf@redhat.com>,
	qemu-riscv@nongnu.org, "Igor Mitsyanko" <i.mitsyanko@gmail.com>,
	"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
	"Max Reitz" <mreitz@redhat.com>,
	"Thomas Huth" <huth@tuxfamily.org>,
	"Michael Walle" <michael@walle.cc>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [RFC PATCH v2 14/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef
Date: Thu, 19 Dec 2019 13:15:26 +0100	[thread overview]
Message-ID: <20191219131526.776cdcb0.cohuck@redhat.com> (raw)
In-Reply-To: <20191218172009.8868-15-philmd@redhat.com>

On Wed, 18 Dec 2019 18:20:09 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> 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 following files were manually modified:
> 
>   - include/chardev/char-fe.h
>   - include/chardev/char.h
>   - include/chardev/char-mux.h
>   - chardev/char.c
>   - chardev/char-mux.c
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

(...)

> diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c
> index 2aab04fd4b..f7aba12565 100644
> --- a/hw/char/terminal3270.c
> +++ b/hw/char/terminal3270.c
> @@ -142,7 +142,7 @@ static void terminal_read(void *opaque, const uint8_t *buf, int size)
>      }
>  }
>  
> -static void chr_event(void *opaque, int event)
> +static void chr_event(void *opaque, QEMUChrEvent event)
>  {
>      Terminal3270 *t = opaque;
>      CcwDevice *ccw_dev = CCW_DEVICE(t);

Acked-by: Cornelia Huck <cohuck@redhat.com>



  parent reply	other threads:[~2019-12-19 12:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-18 17:19 [PATCH v2 00/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef Philippe Mathieu-Daudé
2019-12-18 17:19 ` [PATCH v2 01/14] hw/ipmi: Remove unnecessary declarations Philippe Mathieu-Daudé
2019-12-18 17:19 ` [RFC PATCH v2 02/14] hw/ipmi: Explicit we ignore some QEMUChrEvent in IOEventHandler Philippe Mathieu-Daudé
2019-12-18 18:41   ` Corey Minyard
2019-12-18 20:47   ` Richard Henderson
2019-12-18 22:45     ` Philippe Mathieu-Daudé
2019-12-18 17:19 ` [RFC PATCH v2 03/14] hw/char/terminal3270: Explicit ignored " Philippe Mathieu-Daudé
2019-12-19 12:11   ` Cornelia Huck
2019-12-18 17:19 ` [RFC PATCH v2 04/14] hw/usb/dev-serial: Explicit we ignore few " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 05/14] hw/usb/redirect: " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 06/14] ccid-card-passthru: Explicit we ignore " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 07/14] vhost-user-crypto: Explicit we ignore some " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 08/14] vhost-user-net: Explicit we ignore few " Philippe Mathieu-Daudé
2019-12-19 12:21   ` Michael S. Tsirkin
2019-12-18 17:20 ` [RFC PATCH v2 09/14] vhost-user-blk: " Philippe Mathieu-Daudé
2019-12-19 12:22   ` Michael S. Tsirkin
2019-12-18 17:20 ` [RFC PATCH v2 10/14] virtio-console: Explicit we ignore some " Philippe Mathieu-Daudé
2019-12-19 12:22   ` Michael S. Tsirkin
2019-12-18 17:20 ` [RFC PATCH v2 11/14] monitor/qmp: Explicit we ignore few " Philippe Mathieu-Daudé
2019-12-19 17:00   ` Markus Armbruster
2019-12-18 17:20 ` [PATCH v2 12/14] monitor/hmp: Explicit we ignore a " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 13/14] chardev/char: Explicit we ignore some " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 14/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef Philippe Mathieu-Daudé
2019-12-18 18:42   ` Corey Minyard
2019-12-18 20:44   ` Richard Henderson
2019-12-19 12:15   ` Cornelia Huck [this message]
2019-12-20 13:32 ` [PATCH v2 00/14] " Marc-André Lureau
2020-01-07 15:23   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191219131526.776cdcb0.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=aleksandar.rikalo@rt-rk.com \
    --cc=alex.bennee@linaro.org \
    --cc=alistair@alistair23.me \
    --cc=amarkovic@wavecomp.com \
    --cc=amit@kernel.org \
    --cc=antonynpavlov@gmail.com \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=berto@igalia.com \
    --cc=borntraeger@de.ibm.com \
    --cc=chen.zhang@intel.com \
    --cc=chouteau@adacore.com \
    --cc=dgilbert@redhat.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=frederic.konrad@adacore.com \
    --cc=huth@tuxfamily.org \
    --cc=i.mitsyanko@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=joel@jms.id.au \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=michael@walle.cc \
    --cc=minyard@acm.org \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=pburton@wavecomp.com \
    --cc=peter.chubb@nicta.com.au \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=sagark@eecs.berkeley.edu \
    --cc=samuel.thibault@ens-lyon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).