All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, "John Rigby" <john.rigby@linaro.org>,
	patches@linaro.org, qemu-devel@nongnu.org,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] qapi-schema.json: Reformat TargetType enum to one-per-line
Date: Wed, 22 May 2013 08:15:11 -0500	[thread overview]
Message-ID: <871u8zp34w.fsf@codemonkey.ws> (raw)
In-Reply-To: <519A50EE.8040804@redhat.com>

Paolo Bonzini <pbonzini@redhat.com> writes:

> Il 20/05/2013 18:21, Peter Maydell ha scritto:
>> Reformat the qapi-schema TargetType enumeration so that it has just
>> one target architecture name per line. This allows patches for
>> adding new targets to just add a single line, rather than having
>> to reformat most of the list (resulting in a hard-to-check diff).
>> 
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> d15a9c23 is an example of what you get otherwise.
>> 
>> I would much prefer it if we autogenerated this list so you didn't
>> need to change this file at all to add a new target, but Anthony
>> is against that; so this is at least an improvement.
>
> I have queued a patch for 1.6 that would change this field to a free
> string.  There is no use of this enum, not even for introspection.

I don't object to this, however..

> You
> don't need to know what targets were supported in the version that you
> compiled from.  Only one target is supported in this executable
> anyway.

It seems useful to me.  One day we may support multiple targets per
executable.

There's no obvious place where all of the possible targets are listed so
from the point of view of someone trying to figure out what the
platforms are while writing a management tool, it seems like a useful
thing to have.

We don't add targets very often...  are we optimizing for an uncommon
scenario here?

Regards,

Anthony Liguori

>
> Paolo
>
>>  qapi-schema.json |   30 ++++++++++++++++++++++++++----
>>  1 file changed, 26 insertions(+), 4 deletions(-)
>> 
>> diff --git a/qapi-schema.json b/qapi-schema.json
>> index 199744a..a8d361e 100644
>> --- a/qapi-schema.json
>> +++ b/qapi-schema.json
>> @@ -3018,10 +3018,32 @@
>>  # Since: 1.2.0
>>  ##
>>  { 'enum': 'TargetType',
>> -  'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
>> -            'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'moxie',
>> -            'or32', 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4',
>> -            'sparc64', 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
>> +  'data': [ 'alpha',
>> +            'arm',
>> +            'cris',
>> +            'i386',
>> +            'lm32',
>> +            'm68k',
>> +            'microblazeel',
>> +            'microblaze',
>> +            'mips64el',
>> +            'mips64',
>> +            'mipsel',
>> +            'mips',
>> +            'moxie',
>> +            'or32',
>> +            'ppc64',
>> +            'ppcemb',
>> +            'ppc',
>> +            's390x',
>> +            'sh4eb',
>> +            'sh4',
>> +            'sparc64',
>> +            'sparc',
>> +            'unicore32',
>> +            'x86_64',
>> +            'xtensaeb',
>> +            'xtensa' ] }
>>  
>>  ##
>>  # @TargetInfo:
>> 



WARNING: multiple messages have this Message-ID (diff)
From: Anthony Liguori <aliguori@us.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-trivial@nongnu.org, "John Rigby" <john.rigby@linaro.org>,
	patches@linaro.org, qemu-devel@nongnu.org,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] qapi-schema.json: Reformat TargetType enum to one-per-line
Date: Wed, 22 May 2013 08:15:11 -0500	[thread overview]
Message-ID: <871u8zp34w.fsf@codemonkey.ws> (raw)
In-Reply-To: <519A50EE.8040804@redhat.com>

Paolo Bonzini <pbonzini@redhat.com> writes:

> Il 20/05/2013 18:21, Peter Maydell ha scritto:
>> Reformat the qapi-schema TargetType enumeration so that it has just
>> one target architecture name per line. This allows patches for
>> adding new targets to just add a single line, rather than having
>> to reformat most of the list (resulting in a hard-to-check diff).
>> 
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> d15a9c23 is an example of what you get otherwise.
>> 
>> I would much prefer it if we autogenerated this list so you didn't
>> need to change this file at all to add a new target, but Anthony
>> is against that; so this is at least an improvement.
>
> I have queued a patch for 1.6 that would change this field to a free
> string.  There is no use of this enum, not even for introspection.

I don't object to this, however..

> You
> don't need to know what targets were supported in the version that you
> compiled from.  Only one target is supported in this executable
> anyway.

It seems useful to me.  One day we may support multiple targets per
executable.

There's no obvious place where all of the possible targets are listed so
from the point of view of someone trying to figure out what the
platforms are while writing a management tool, it seems like a useful
thing to have.

We don't add targets very often...  are we optimizing for an uncommon
scenario here?

Regards,

Anthony Liguori

>
> Paolo
>
>>  qapi-schema.json |   30 ++++++++++++++++++++++++++----
>>  1 file changed, 26 insertions(+), 4 deletions(-)
>> 
>> diff --git a/qapi-schema.json b/qapi-schema.json
>> index 199744a..a8d361e 100644
>> --- a/qapi-schema.json
>> +++ b/qapi-schema.json
>> @@ -3018,10 +3018,32 @@
>>  # Since: 1.2.0
>>  ##
>>  { 'enum': 'TargetType',
>> -  'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
>> -            'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'moxie',
>> -            'or32', 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4',
>> -            'sparc64', 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
>> +  'data': [ 'alpha',
>> +            'arm',
>> +            'cris',
>> +            'i386',
>> +            'lm32',
>> +            'm68k',
>> +            'microblazeel',
>> +            'microblaze',
>> +            'mips64el',
>> +            'mips64',
>> +            'mipsel',
>> +            'mips',
>> +            'moxie',
>> +            'or32',
>> +            'ppc64',
>> +            'ppcemb',
>> +            'ppc',
>> +            's390x',
>> +            'sh4eb',
>> +            'sh4',
>> +            'sparc64',
>> +            'sparc',
>> +            'unicore32',
>> +            'x86_64',
>> +            'xtensaeb',
>> +            'xtensa' ] }
>>  
>>  ##
>>  # @TargetInfo:
>> 

  parent reply	other threads:[~2013-05-22 13:15 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 16:21 [Qemu-trivial] [PATCH] qapi-schema.json: Reformat TargetType enum to one-per-line Peter Maydell
2013-05-20 16:21 ` [Qemu-devel] " Peter Maydell
2013-05-20 16:35 ` [Qemu-trivial] " Paolo Bonzini
2013-05-20 16:35   ` [Qemu-devel] " Paolo Bonzini
2013-05-20 16:38   ` [Qemu-trivial] " Peter Maydell
2013-05-20 16:38     ` [Qemu-devel] " Peter Maydell
2013-05-20 17:14     ` [Qemu-trivial] " Paolo Bonzini
2013-05-20 17:14       ` [Qemu-devel] " Paolo Bonzini
2013-05-22 13:15   ` Anthony Liguori [this message]
2013-05-22 13:15     ` Anthony Liguori
2013-05-22 13:50     ` [Qemu-trivial] " Andreas Färber
2013-05-22 13:50       ` Andreas Färber
2013-05-22 14:28       ` [Qemu-trivial] " Anthony Liguori
2013-05-22 14:28         ` Anthony Liguori
2013-05-22 14:34         ` [Qemu-devel] New targets (was: [PATCH] qapi-schema.json: Reformat TargetType enum to one-per-line) Andreas Färber
2013-05-22 14:48           ` Anthony Liguori
2013-05-22 15:33             ` Peter Maydell
2013-05-22 16:10               ` Anthony Liguori
2013-05-22 13:51     ` [Qemu-trivial] [Qemu-devel] [PATCH] qapi-schema.json: Reformat TargetType enum to one-per-line Peter Maydell
2013-05-22 13:51       ` Peter Maydell
2013-05-22 14:29       ` [Qemu-trivial] " Anthony Liguori
2013-05-22 14:29         ` Anthony Liguori
2013-05-22 14:38         ` [Qemu-trivial] " Paolo Bonzini
2013-05-22 14:38           ` Paolo Bonzini
2013-05-24 21:38         ` [Qemu-trivial] [libvirt] " Eric Blake
2013-05-24 21:38           ` [Qemu-devel] [libvirt] " Eric Blake
2013-05-25  9:18           ` [Qemu-trivial] [libvirt] [Qemu-devel] " Peter Maydell
2013-05-25  9:18             ` [Qemu-devel] [libvirt] " Peter Maydell
2013-05-25 12:31             ` [Qemu-trivial] " Andreas Färber
2013-05-25 12:31               ` Andreas Färber
2013-05-20 16:41 ` [Qemu-trivial] [Qemu-devel] " Eric Blake
2013-05-20 16:41   ` Eric Blake
2013-05-20 16:47   ` [Qemu-trivial] " Peter Maydell
2013-05-20 16:47     ` Peter Maydell
2013-05-20 16:57     ` [Qemu-trivial] " Eric Blake
2013-05-20 16:57       ` Eric Blake
2013-05-20 17:05       ` [Qemu-trivial] " Paolo Bonzini
2013-05-20 17:05         ` [Qemu-devel] " Paolo Bonzini
2013-05-22 13:12 ` [Qemu-trivial] " Anthony Liguori
2013-05-22 13:12   ` Anthony Liguori
2013-05-22 13:38   ` [Qemu-trivial] " Peter Maydell
2013-05-22 13:38     ` Peter Maydell

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=871u8zp34w.fsf@codemonkey.ws \
    --to=aliguori@us.ibm.com \
    --cc=afaerber@suse.de \
    --cc=john.rigby@linaro.org \
    --cc=patches@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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.