All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Eric Blake <eblake@redhat.com>,
	Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
	qemu-devel@nongnu.org
Cc: natalia.fursova@ispras.ru, arikalo@wavecomp.com,
	armbru@redhat.com, mdroth@linux.vnet.ibm.com, dovgaluk@ispras.ru,
	amarkovic@wavecomp.com, marcandre.lureau@redhat.com,
	aurelien@aurel32.net
Subject: Re: [Qemu-devel] [PATCH v2] target/mips: implement QMP query-cpu-definitions command
Date: Tue, 19 Feb 2019 22:03:13 +0100	[thread overview]
Message-ID: <a0214921-e873-9611-6bdb-966e4065e9dd@redhat.com> (raw)
In-Reply-To: <d935f740-e792-1b7b-80ed-eb400ee14a3d@redhat.com>

Hi Eric,

On 2/19/19 9:12 PM, Eric Blake wrote:
> On 2/19/19 1:15 PM, Aleksandar Markovic wrote:
>> From: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
>>
>> This patch enables QMP-based querying of the available CPU types for
>> MIPS and MIPS64 platforms.
>>
>> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
>> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
> 
>> +++ b/qapi/target.json
>> @@ -499,7 +499,7 @@
>>              'static': 'bool',
>>              '*unavailable-features': [ 'str' ],
>>              'typename': 'str' },
>> -  'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X)' }
>> +  'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }
> 
> Hmm. Long line; however, the argument to 'if' is pasted literally to an
> #if directive, which would break if we added newlines in the middle.
> And we can't use literal newlines in the middle of a JSON string.  About
> the only thing I could think of that might allow for more manageable
> line lengths would be permitting:
> 
> 'if': [ 'defined(TARGET_PPC)',
>         'defined(TARGET_ARM)' ...]

Can this be:

'if': [
        'defined(TARGET_PPC)',
        'defined(TARGET_ARM)',
        ...
      ]

?

> where the QAPI generator would in turn form the disjunction of supplying
> the || between each term when the 'if' is an array of strings. But that
> feels like a lot of effort for little gain compared to just living with
> the long lines.

Single line looks easier thus less bug prone.

Multiline improves git diff/blame.

The former looks safer.

  reply	other threads:[~2019-02-19 21:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 19:15 [Qemu-devel] [PATCH v2] target/mips: implement QMP query-cpu-definitions command Aleksandar Markovic
2019-02-19 19:28 ` Philippe Mathieu-Daudé
2019-02-19 19:49   ` Aleksandar Markovic
2019-02-19 20:12 ` Eric Blake
2019-02-19 21:03   ` Philippe Mathieu-Daudé [this message]
2019-02-20  3:56   ` Markus Armbruster
2019-02-20  4:02 ` Markus Armbruster
2019-02-20 12:32   ` Aleksandar Markovic
2019-02-20 16:50     ` Markus Armbruster
2019-02-22 14:44       ` Aleksandar Markovic

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=a0214921-e873-9611-6bdb-966e4065e9dd@redhat.com \
    --to=philmd@redhat.com \
    --cc=aleksandar.markovic@rt-rk.com \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=armbru@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=dovgaluk@ispras.ru \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=natalia.fursova@ispras.ru \
    --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.