All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: John Snow <jsnow@redhat.com>, QEMU <qemu-devel@nongnu.org>
Subject: Re: [PATCH v7 08/10] qapi: Use 'if': { 'any': ... } where appropriate
Date: Thu, 5 Aug 2021 18:41:06 +0400	[thread overview]
Message-ID: <CAJ+F1CL_a8nH-sNBxEY2zVUd1rG7QnevwQPraG69KWjFGUb5CQ@mail.gmail.com> (raw)
In-Reply-To: <87lf5g6lly.fsf@dusky.pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 5480 bytes --]

Hi

On Thu, Aug 5, 2021 at 5:57 PM Markus Armbruster <armbru@redhat.com> wrote:

> marcandre.lureau@redhat.com writes:
>
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> > Tested-by: John Snow <jsnow@redhat.com>
> > Reviewed-by: Markus Armbruster <armbru@redhat.com>
> > ---
> >  qapi/machine-target.json | 20 ++++++++++++++++----
> >  qapi/misc-target.json    | 12 +++++++++++-
> >  2 files changed, 27 insertions(+), 5 deletions(-)
> >
> > diff --git a/qapi/machine-target.json b/qapi/machine-target.json
> > index e7811654b7..9b56b81bea 100644
> > --- a/qapi/machine-target.json
> > +++ b/qapi/machine-target.json
> > @@ -213,7 +213,9 @@
> >  ##
> >  { 'struct': 'CpuModelExpansionInfo',
> >    'data': { 'model': 'CpuModelInfo' },
> > -  'if': 'defined(TARGET_S390X) || defined(TARGET_I386) ||
> defined(TARGET_ARM)' }
> > +  'if': { 'any': [ 'defined(TARGET_S390X)',
> > +                   'defined(TARGET_I386)',
> > +                   'defined(TARGET_ARM)'] } }
> >
> >  ##
> >  # @query-cpu-model-expansion:
> > @@ -252,7 +254,9 @@
> >    'data': { 'type': 'CpuModelExpansionType',
> >              'model': 'CpuModelInfo' },
> >    'returns': 'CpuModelExpansionInfo',
> > -  'if': 'defined(TARGET_S390X) || defined(TARGET_I386) ||
> defined(TARGET_ARM)' }
> > +  'if': { 'any': [ 'defined(TARGET_S390X)',
> > +                   'defined(TARGET_I386)',
> > +                   'defined(TARGET_ARM)' ] } }
> >
> >  ##
> >  # @CpuDefinitionInfo:
> > @@ -316,7 +320,11 @@
> >              'typename': 'str',
> >              '*alias-of' : 'str',
> >              'deprecated' : 'bool' },
> > -  'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) ||
> defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }
> > +  'if': { 'any': [ 'defined(TARGET_PPC)',
> > +                   'defined(TARGET_ARM)',
> > +                   'defined(TARGET_I386)',
> > +                   'defined(TARGET_S390X)',
> > +                   'defined(TARGET_MIPS)' ] } }
> >
> >  ##
> >  # @query-cpu-definitions:
> > @@ -328,4 +336,8 @@
> >  # Since: 1.2
> >  ##
> >  { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'],
> > -  'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) ||
> defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }
> > +  'if': { 'any': [ 'defined(TARGET_PPC)',
> > +                   'defined(TARGET_ARM)',
> > +                   'defined(TARGET_I386)',
> > +                   'defined(TARGET_S390X)',
> > +                   'defined(TARGET_MIPS)' ] } }
> > diff --git a/qapi/misc-target.json b/qapi/misc-target.json
> > index 5573dcf8f0..9e2ea4a04a 100644
> > --- a/qapi/misc-target.json
> > +++ b/qapi/misc-target.json
> > @@ -23,7 +23,17 @@
> >  ##
> >  { 'event': 'RTC_CHANGE',
> >    'data': { 'offset': 'int' },
> > -  'if': 'defined(TARGET_ALPHA) || defined(TARGET_ARM) ||
> defined(TARGET_HPPA) || defined(TARGET_I386) || defined(TARGET_MIPS) ||
> defined(TARGET_MIPS64) || defined(TARGET_PPC) || defined(TARGET_PPC64) ||
> defined(TARGET_S390X) || defined(TARGET_SH4) || defined(TARGET_SPARC)' }
> > +  'if': { 'any': [ 'defined(TARGET_ALPHA)',
> > +                   'defined(TARGET_ARM)',
> > +                   'defined(TARGET_HPPA)',
> > +                   'defined(TARGET_I386)',
> > +                   'defined(TARGET_MIPS)',
> > +                   'defined(TARGET_MIPS64)',
> > +                   'defined(TARGET_PPC)',
> > +                   'defined(TARGET_PPC64)',
> > +                   'defined(TARGET_S390X)',
> > +                   'defined(TARGET_SH4)',
> > +                   'defined(TARGET_SPARC)' ] } }
> >
> >  ##
> >  # @rtc-reset-reinjection:
>
> Missing:
>
>   diff --git a/qapi/ui.json b/qapi/ui.json
>   index fd9677d48e..aed2bec4ab 100644
>   --- a/qapi/ui.json
>   +++ b/qapi/ui.json
>   @@ -1136,7 +1136,8 @@
>        { 'name': 'gtk', 'if': 'defined(CONFIG_GTK)' },
>        { 'name': 'sdl', 'if': 'defined(CONFIG_SDL)' },
>        { 'name': 'egl-headless',
>   -              'if': 'defined(CONFIG_OPENGL) && defined(CONFIG_GBM)' },
>   +              'if': { 'all': [ 'defined(CONFIG_OPENGL)',
>   +                               'defined(CONFIG_GBM)' ] } },
>        { 'name': 'curses', 'if': 'defined(CONFIG_CURSES)' },
>        { 'name': 'cocoa', 'if': 'defined(CONFIG_COCOA)' },
>        { 'name': 'spice-app', 'if': 'defined(CONFIG_SPICE)'} ] }
>   @@ -1167,7 +1168,8 @@
>          'gtk': { 'type': 'DisplayGTK', 'if': 'defined(CONFIG_GTK)' },
>          'curses': { 'type': 'DisplayCurses', 'if':
> 'defined(CONFIG_CURSES)' },
>          'egl-headless': { 'type': 'DisplayEGLHeadless',
>   -                        'if': 'defined(CONFIG_OPENGL) &&
> defined(CONFIG_GBM)' }
>   +                        'if': { 'all': [ 'defined(CONFIG_OPENGL)',
>   +                                         'defined(CONFIG_GBM)' ] } }
>      }
>    }
>
>
> You make up for it in PATCH 10.  Can tidy up in my tree.
>
>
Ah yes, those are new in the rebase. I think they could either be squashed
in this patch (with update title), or a new patch. Leaving to the last
patch isn't really a big issue either I suppose.

Thanks in advance for cleaning it up if you take it :)


-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 8153 bytes --]

  reply	other threads:[~2021-08-05 14:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  8:30 [PATCH v7 00/10] qapi: untie 'if' conditions from C preprocessor marcandre.lureau
2021-08-04  8:30 ` [PATCH v7 01/10] docs: update the documentation upfront about schema configuration marcandre.lureau
2021-08-04  8:30 ` [PATCH v7 02/10] qapi: wrap Sequence[str] in an object marcandre.lureau
2021-08-04  8:30 ` [PATCH v7 03/10] qapi: add QAPISchemaIfCond.is_present() marcandre.lureau
2021-08-04  8:30 ` [PATCH v7 04/10] qapi: introduce QAPISchemaIfCond.cgen() marcandre.lureau
2021-08-05 11:53   ` Markus Armbruster
2021-08-04  8:31 ` [PATCH v7 05/10] qapidoc: introduce QAPISchemaIfCond.docgen() marcandre.lureau
2021-08-05 11:55   ` Markus Armbruster
2021-08-05 12:02     ` Marc-André Lureau
2021-08-05 17:34       ` Markus Armbruster
2021-08-04  8:31 ` [PATCH v7 06/10] qapi: replace if condition list with dict {'all': [...]} marcandre.lureau
2021-08-05 13:41   ` Markus Armbruster
2021-08-05 14:00     ` Marc-André Lureau
2021-08-05 16:06     ` Markus Armbruster
2021-08-05 15:14   ` Markus Armbruster
2021-08-04  8:31 ` [PATCH v7 07/10] qapi: add 'any' condition marcandre.lureau
2021-08-04  8:31 ` [PATCH v7 08/10] qapi: Use 'if': { 'any': ... } where appropriate marcandre.lureau
2021-08-05 13:56   ` Markus Armbruster
2021-08-05 14:41     ` Marc-André Lureau [this message]
2021-08-06  6:48       ` Markus Armbruster
2021-08-04  8:31 ` [PATCH v7 09/10] qapi: add 'not' condition operation marcandre.lureau
2021-08-06  6:52   ` Markus Armbruster
2021-08-04  8:31 ` [PATCH v7 10/10] qapi: make 'if' condition strings simple identifiers marcandre.lureau
2021-08-05 19:21   ` Eric Blake
2021-08-05 17:36 ` [PATCH v7 00/10] qapi: untie 'if' conditions from C preprocessor Markus Armbruster
2021-08-07  6:05   ` Markus Armbruster

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=CAJ+F1CL_a8nH-sNBxEY2zVUd1rG7QnevwQPraG69KWjFGUb5CQ@mail.gmail.com \
    --to=marcandre.lureau@gmail.com \
    --cc=armbru@redhat.com \
    --cc=jsnow@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.