qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 27/40] char: move QIOChannel-related in char-io.


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 27/40] char: move QIOChannel-related in char-io.h
Date: Thu, 12 Jan 2017 17:26:33 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 01/11/2017 11:29 AM, Marc-André Lureau wrote:

Grammar in subject is a bit terse; maybe:

char: move QIOChannel-related stuff to char-io.h

> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
>  chardev/char-io.h     |  24 +++++++
>  chardev/char-io.c     | 168 ++++++++++++++++++++++++++++++++++++++++++++++++
>  chardev/char.c        | 174 
> +-------------------------------------------------
>  chardev/Makefile.objs |   1 +
>  4 files changed, 194 insertions(+), 173 deletions(-)
>  create mode 100644 chardev/char-io.h
>  create mode 100644 chardev/char-io.c
> 
> diff --git a/chardev/char-io.h b/chardev/char-io.h
> new file mode 100644
> index 0000000000..ea559fd124
> --- /dev/null
> +++ b/chardev/char-io.h
> @@ -0,0 +1,24 @@
> +#ifndef CHAR_IO_H
> +#define CHAR_IO_H

Must... resist... the temptation to repeat myself!

> +
> +#include "qemu/osdep.h"

.h files should NOT include osdep.h; since all .c files included it
before any other .h file, then all things in osdep.h are already in
scope at the point the .h file starts.


> +static gboolean io_watch_poll_prepare(GSource *source,
> +                                      gint *timeout_)
> +{

Why the weird spelling of timeout_ ?  Maybe timeout_unused is better?


> +++ b/chardev/char.c

> -static gboolean io_watch_poll_prepare(GSource *source,
> -                                      gint *timeout_)

Then again, it's code motion.  Again, up to you if you want to tweak
style things during code motion, or split them into a general cleanup
patch separately.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]