[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: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH 27/40] char: move QIOChannel-related in char-io.h |
Date: |
Fri, 13 Jan 2017 11:42:55 -0500 (EST) |
Hi
----- Original Message -----
> 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!
Ok, I'll just copy the original copyright from qemu-char.c in all the files I
created in the series.
>
> > +
> > +#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.
ok
>
>
> > +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.
yeah, weird style, any idea why Anthony wrote it that way in commit 96c638477?
I guess I may just drop the _ during the move
- [Qemu-devel] [PATCH 24/40] char: move ringbuf/memory to its own file, (continued)
- [Qemu-devel] [PATCH 24/40] char: move ringbuf/memory to its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 23/40] char: move mux to its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 26/40] char: remove unused READ_RETRIES, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 25/40] char: rename and move to header CHR_READ_BUF_LEN, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 27/40] char: move QIOChannel-related in char-io.h, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 28/40] char: move fd chardev in its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 29/40] char: move win chardev base class in its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 30/40] char: move win-stdio into its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 34/40] char: move stdio in its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 33/40] char: move file chardev in its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 32/40] char: move udp chardev in its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 35/40] char: move console in its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 36/40] char: move pipe chardev in its own file, Marc-André Lureau, 2017/01/11
- [Qemu-devel] [PATCH 37/40] char: move pty chardev in its own file, Marc-André Lureau, 2017/01/11