qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/16] qapi: Drop superfluous qapi_enum_parse()


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 02/16] qapi: Drop superfluous qapi_enum_parse() parameter max
Date: Thu, 24 Aug 2017 11:38:33 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 08/24/2017 03:45 AM, Markus Armbruster wrote:
> The lookup tables have a sentinel, no need to make callers pass their
> size.
> 
> Fun: the header has it in the wrong position.  Good riddance.
> 
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
>  block.c                  |  1 -
>  block/file-posix.c       |  7 +++----
>  block/file-win32.c       |  2 +-
>  block/gluster.c          |  6 ++----
>  block/parallels.c        |  3 ++-
>  block/qcow2.c            |  6 ++----
>  blockdev.c               |  1 -
>  hmp.c                    |  2 +-
>  include/qapi/util.h      |  2 +-
>  migration/global_state.c |  3 +--

This would be a patch where using scripts/git.orderfile to highlight the
interface change first would make review a bit quicker :)

> +++ b/include/qapi/util.h
> @@ -12,7 +12,7 @@
>  #define QAPI_UTIL_H
>  
>  int qapi_enum_parse(const char * const lookup[], const char *buf,
> -                    int max, int def, Error **errp);
> +                    int def, Error **errp);

I'm not sure what you meant by wrong position; were you thinking that
lookup/max should be immediately adjacent (since max is a property of
the lookup[] parameter), and sticking 'buf' in between the two is what
meant 'max' was in the wrong position?

The change itself is reasonable, even if the commit message needs a
tweak to answer my question.

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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