qemu-stable
[Top][All Lists]
Advanced

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

Re: [Qemu-stable] [Qemu-devel] [PATCH 1/2] Header cleanups


From: Daniel P . Berrangé
Subject: Re: [Qemu-stable] [Qemu-devel] [PATCH 1/2] Header cleanups
Date: Mon, 1 Apr 2019 10:39:04 +0100
User-agent: Mutt/1.11.3 (2019-02-01)

On Mon, Apr 01, 2019 at 01:56:54PM +0530, Aruna Jayasena wrote:
> Declarations were moved out of qemu-common.h for functions declared in utils/ 
> files.
> This task was under https://wiki.qemu.org/Contribute/BiteSizedTasks
> 
> Signed-off-by: Aruna Jayasena <address@hidden>
> 
> ---
>  include/qemu-common.h        | 6 ------
>  include/qemu/id.h            | 3 +++
>  include/qemu/iov.h           | 6 ++++++
>  include/qemu/readline.h      | 2 ++
>  util/aio-posix.c             | 1 -
>  util/aio-win32.c             | 1 -
>  util/async.c                 | 1 -
>  util/bufferiszero.c          | 1 -
>  util/compatfd.c              | 1 -
>  util/coroutine-sigaltstack.c | 1 -
>  util/coroutine-ucontext.c    | 1 -
>  util/coroutine-win32.c       | 1 -
>  util/crc32c.c                | 1 -
>  util/cutils.c                | 1 -
>  util/envlist.c               | 1 -
>  util/error.c                 | 1 -
>  util/event_notifier-posix.c  | 1 -
>  util/event_notifier-win32.c  | 1 -
>  util/fifo8.c                 | 1 -
>  util/getauxval.c             | 1 -
>  util/hexdump.c               | 2 +-
>  util/id.c                    | 1 -
>  util/iohandler.c             | 1 -
>  util/iov.c                   | 1 -
>  util/log.c                   | 1 -
>  util/module.c                | 1 -
>  util/notify.c                | 1 -
>  util/qemu-coroutine-io.c     | 1 -
>  util/qemu-coroutine.c        | 1 -
>  util/qemu-openpty.c          | 2 +-
>  util/qemu-option.c           | 1 -
>  util/qemu-progress.c         | 2 +-
>  util/qemu-thread-win32.c     | 1 -
>  util/rcu.c                   | 1 -
>  util/readline.c              | 1 -
>  util/thread-pool.c           | 1 -
>  util/uuid.c                  | 1 -
>  37 files changed, 14 insertions(+), 39 deletions(-)
> 
> diff --git a/include/qemu-common.h b/include/qemu-common.h
> index a102245519..9543c469b6 100644
> --- a/include/qemu-common.h
> +++ b/include/qemu-common.h
> @@ -141,12 +141,6 @@ int os_parse_cmd_args(int index, const char *optarg);
>  
>  #include "qemu/module.h"
>  
> -/*
> - * Hexdump a buffer to a file. An optional string prefix is added to every 
> line
> - */
> -
> -void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t 
> size);
> -
>  /*
>   * helper to parse debug environment variables
>   */

You forgot to remove

> diff --git a/include/qemu/id.h b/include/qemu/id.h
> index 40c70103e4..3a651fb9d2 100644
> --- a/include/qemu/id.h
> +++ b/include/qemu/id.h
> @@ -1,6 +1,9 @@
>  #ifndef QEMU_ID_H
>  #define QEMU_ID_H
>  
> +#define qemu_isalnum(c)              isalnum((unsigned char)(c))
> +#define qemu_isalpha(c)              isalpha((unsigned char)(c))

If we want to move these, they would be better off living in
include/qemu/cutils.h   You should move *all* of the qemu_is*
functions at the same time, not just 2 lof them & they should
be removed from qemu-common.h.

Ideally you would have multiple commits here, each doing a separate part of
the cleanup.

  1. Move the qemu-hexdump declaration
  2. Move the qemu_is* macros
  3. Remove qemu-common.h from source files which don't need it contents.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

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