qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 03/13] char-win: rename win_chr_init/poll win_chr_serial_init/poll
Date: Tue, 9 May 2017 09:53:45 -0300	[thread overview]
Message-ID: <0dc4659f-e42d-e89b-30e7-cfa6adf226a7@amsat.org> (raw)
In-Reply-To: <20170509113332.4987-4-marcandre.lureau@redhat.com>

On 05/09/2017 08:33 AM, Marc-André Lureau wrote:
> Those 2 functions are specific to serial chardev, make it more clear.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  chardev/char-win.h    | 2 +-
>  chardev/char-serial.c | 2 +-
>  chardev/char-win.c    | 8 ++++----
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/chardev/char-win.h b/chardev/char-win.h
> index 70215e04c2..e0b3839a77 100644
> --- a/chardev/char-win.h
> +++ b/chardev/char-win.h
> @@ -46,7 +46,7 @@ typedef struct {
>  #define WIN_CHARDEV(obj) OBJECT_CHECK(WinChardev, (obj), TYPE_CHARDEV_WIN)
>
>  void qemu_chr_open_win_file(Chardev *chr, HANDLE fd_out);
> -int win_chr_init(Chardev *chr, const char *filename, Error **errp);
> +int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp);
>  int win_chr_pipe_poll(void *opaque);
>
>  #endif /* CHAR_WIN_H */
> diff --git a/chardev/char-serial.c b/chardev/char-serial.c
> index 094e08dca5..fef3a91c77 100644
> --- a/chardev/char-serial.c
> +++ b/chardev/char-serial.c
> @@ -45,7 +45,7 @@ static void qmp_chardev_open_serial(Chardev *chr,
>  {
>      ChardevHostdev *serial = backend->u.serial.data;
>
> -    win_chr_init(chr, serial->device, errp);
> +    win_chr_serial_init(chr, serial->device, errp);
>  }
>
>  #elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)      \
> diff --git a/chardev/char-win.c b/chardev/char-win.c
> index 5e7daeeae1..11abad1521 100644
> --- a/chardev/char-win.c
> +++ b/chardev/char-win.c
> @@ -56,7 +56,7 @@ static void win_chr_read(Chardev *chr, DWORD len)
>      }
>  }
>
> -static int win_chr_poll(void *opaque)
> +static int win_chr_serial_poll(void *opaque)

Nice :)

>  {
>      Chardev *chr = CHARDEV(opaque);
>      WinChardev *s = WIN_CHARDEV(opaque);
> @@ -71,7 +71,7 @@ static int win_chr_poll(void *opaque)
>      return 0;
>  }
>
> -int win_chr_init(Chardev *chr, const char *filename, Error **errp)
> +int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp)
>  {
>      WinChardev *s = WIN_CHARDEV(chr);
>      COMMCONFIG comcfg;
> @@ -130,7 +130,7 @@ int win_chr_init(Chardev *chr, const char *filename, Error **errp)
>          error_setg(errp, "Failed ClearCommError");
>          goto fail;
>      }
> -    qemu_add_polling_cb(win_chr_poll, chr);
> +    qemu_add_polling_cb(win_chr_serial_poll, chr);
>      return 0;
>
>   fail:
> @@ -208,7 +208,7 @@ static void char_win_finalize(Object *obj)
>      if (s->fpipe) {
>          qemu_del_polling_cb(win_chr_pipe_poll, chr);
>      } else {
> -        qemu_del_polling_cb(win_chr_poll, chr);
> +        qemu_del_polling_cb(win_chr_serial_poll, chr);
>      }
>
>      qemu_chr_be_event(chr, CHR_EVENT_CLOSED);
>

  reply	other threads:[~2017-05-09 12:53 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09 11:33 [Qemu-devel] [PATCH 00/13] chardev: misc clean-ups Marc-André Lureau
2017-05-09 11:33 ` [Qemu-devel] [PATCH 01/13] char-win: simplify win_chr_read() Marc-André Lureau
2017-05-09 12:55   ` Philippe Mathieu-Daudé
2017-05-09 11:33 ` [Qemu-devel] [PATCH 02/13] char-win: remove WinChardev.len Marc-André Lureau
2017-05-09 12:47   ` Philippe Mathieu-Daudé
2017-05-09 11:33 ` [Qemu-devel] [PATCH 03/13] char-win: rename win_chr_init/poll win_chr_serial_init/poll Marc-André Lureau
2017-05-09 12:53   ` Philippe Mathieu-Daudé [this message]
2017-05-09 11:33 ` [Qemu-devel] [PATCH 04/13] char-win: rename hcom->file Marc-André Lureau
2017-05-09 12:48   ` Philippe Mathieu-Daudé
2017-05-09 11:33 ` [Qemu-devel] [PATCH 05/13] char-win: close file handle except with console Marc-André Lureau
2017-05-26 15:30   ` Philippe Mathieu-Daudé
2017-05-29  7:25     ` Marc-André Lureau
2017-05-09 11:33 ` [Qemu-devel] [PATCH 06/13] chardev: move headers to include/chardev Marc-André Lureau
2017-05-09 11:39   ` Paolo Bonzini
2017-05-09 11:33 ` [Qemu-devel] [PATCH 07/13] chardev: serial & parallel declaration to own headers Marc-André Lureau
2017-05-09 11:41   ` Paolo Bonzini
2017-05-26 11:41     ` Marc-André Lureau
2017-05-09 11:33 ` [Qemu-devel] [PATCH 08/13] be-hci: use backend functions Marc-André Lureau
2017-05-26 12:20   ` Marc-André Lureau
2017-05-28 11:37     ` andrzej zaborowski
2017-05-26 15:39   ` Philippe Mathieu-Daudé
2017-05-09 11:33 ` [Qemu-devel] [PATCH 09/13] char: generalize qemu_chr_write_all() Marc-André Lureau
2017-05-09 12:58   ` Philippe Mathieu-Daudé
2017-05-26 12:37     ` Marc-André Lureau
2017-05-09 11:33 ` [Qemu-devel] [PATCH 10/13] char: move CharBackend handling in char-fe unit Marc-André Lureau
2017-05-09 11:33 ` [Qemu-devel] [PATCH 11/13] Remove/replace chardev/char.h inclusion Marc-André Lureau
2017-05-09 12:45   ` Philippe Mathieu-Daudé
2017-05-26 13:35     ` Marc-André Lureau
2017-05-09 11:33 ` [Qemu-devel] [PATCH 12/13] char: rename functions that are not part of fe Marc-André Lureau
2017-05-09 12:51   ` Philippe Mathieu-Daudé
2017-05-09 11:33 ` [Qemu-devel] [PATCH 13/13] char: make chr_fe_deinit() optionaly delete backend Marc-André Lureau
2017-05-09 12:21 ` [Qemu-devel] [PATCH 00/13] chardev: misc clean-ups no-reply
2017-05-09 12:32 ` no-reply

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=0dc4659f-e42d-e89b-30e7-cfa6adf226a7@amsat.org \
    --to=f4bug@amsat.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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).