[PATCH] qapi: Delete unwanted indentation of top-level expressions

Markus Armbruster posted 1 patch 1 week ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200730091656.2633334-1-armbru@redhat.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, Markus Armbruster <armbru@redhat.com>, Eric Blake <eblake@redhat.com>
qapi/block-core.json | 24 ++++++++++++------------
qapi/ui.json         |  4 ++--
2 files changed, 14 insertions(+), 14 deletions(-)

[PATCH] qapi: Delete unwanted indentation of top-level expressions

Posted by Markus Armbruster 1 week ago
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qapi/block-core.json | 24 ++++++++++++------------
 qapi/ui.json         |  4 ++--
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index ab7bf3c612..bdcc8e5f9f 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1847,8 +1847,8 @@
 #
 # Since: 4.0
 ##
-  { 'enum': 'BlockPermission',
-    'data': [ 'consistent-read', 'write', 'write-unchanged', 'resize',
+{ 'enum': 'BlockPermission',
+  'data': [ 'consistent-read', 'write', 'write-unchanged', 'resize',
               'graph-mod' ] }
 ##
 # @XDbgBlockGraphEdge:
@@ -2155,8 +2155,8 @@
 # <- { "return": {} }
 #
 ##
-  { 'command': 'block-dirty-bitmap-enable',
-    'data': 'BlockDirtyBitmap' }
+{ 'command': 'block-dirty-bitmap-enable',
+  'data': 'BlockDirtyBitmap' }
 
 ##
 # @block-dirty-bitmap-disable:
@@ -2176,8 +2176,8 @@
 # <- { "return": {} }
 #
 ##
-    { 'command': 'block-dirty-bitmap-disable',
-      'data': 'BlockDirtyBitmap' }
+{ 'command': 'block-dirty-bitmap-disable',
+  'data': 'BlockDirtyBitmap' }
 
 ##
 # @block-dirty-bitmap-merge:
@@ -2208,8 +2208,8 @@
 # <- { "return": {} }
 #
 ##
-      { 'command': 'block-dirty-bitmap-merge',
-        'data': 'BlockDirtyBitmapMerge' }
+{ 'command': 'block-dirty-bitmap-merge',
+  'data': 'BlockDirtyBitmapMerge' }
 
 ##
 # @BlockDirtyBitmapSha256:
@@ -2220,8 +2220,8 @@
 #
 # Since: 2.10
 ##
-  { 'struct': 'BlockDirtyBitmapSha256',
-    'data': {'sha256': 'str'} }
+{ 'struct': 'BlockDirtyBitmapSha256',
+  'data': {'sha256': 'str'} }
 
 ##
 # @x-debug-block-dirty-bitmap-sha256:
@@ -2235,8 +2235,8 @@
 #
 # Since: 2.10
 ##
-  { 'command': 'x-debug-block-dirty-bitmap-sha256',
-    'data': 'BlockDirtyBitmap', 'returns': 'BlockDirtyBitmapSha256' }
+{ 'command': 'x-debug-block-dirty-bitmap-sha256',
+  'data': 'BlockDirtyBitmap', 'returns': 'BlockDirtyBitmapSha256' }
 
 ##
 # @blockdev-mirror:
diff --git a/qapi/ui.json b/qapi/ui.json
index e16e98a060..1568cfeaad 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -1081,8 +1081,8 @@
  # Since: 3.0
  #
  ##
- { 'enum'    : 'DisplayGLMode',
-   'data'    : [ 'off', 'on', 'core', 'es' ] }
+{ 'enum'    : 'DisplayGLMode',
+  'data'    : [ 'off', 'on', 'core', 'es' ] }
 
 ##
 # @DisplayCurses:
-- 
2.26.2


Re: [PATCH] qapi: Delete unwanted indentation of top-level expressions

Posted by Markus Armbruster 1 week ago
Queued.


Re: [PATCH] qapi: Delete unwanted indentation of top-level expressions

Posted by Eric Blake 1 week ago
On 7/30/20 4:16 AM, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>   qapi/block-core.json | 24 ++++++++++++------------
>   qapi/ui.json         |  4 ++--
>   2 files changed, 14 insertions(+), 14 deletions(-)
> 

> +++ b/qapi/ui.json
> @@ -1081,8 +1081,8 @@
>    # Since: 3.0
>    #
>    ##
> - { 'enum'    : 'DisplayGLMode',
> -   'data'    : [ 'off', 'on', 'core', 'es' ] }
> +{ 'enum'    : 'DisplayGLMode',
> +  'data'    : [ 'off', 'on', 'core', 'es' ] }

We are really inconsistent on whether we use space before ':'.  Oh well, 
not the problem of this patch.

With the one additional line reindented as covered by Max' review,

Reviewed-by: Eric Blake <eblake@redhat.com>

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


Re: [PATCH] qapi: Delete unwanted indentation of top-level expressions

Posted by Max Reitz 1 week ago
On 30.07.20 11:16, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  qapi/block-core.json | 24 ++++++++++++------------
>  qapi/ui.json         |  4 ++--
>  2 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index ab7bf3c612..bdcc8e5f9f 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -1847,8 +1847,8 @@
>  #
>  # Since: 4.0
>  ##
> -  { 'enum': 'BlockPermission',
> -    'data': [ 'consistent-read', 'write', 'write-unchanged', 'resize',
> +{ 'enum': 'BlockPermission',
> +  'data': [ 'consistent-read', 'write', 'write-unchanged', 'resize',
>                'graph-mod' ] }

Do we want to keep the alignment at the opening parenthesis here?

Max

Re: [PATCH] qapi: Delete unwanted indentation of top-level expressions

Posted by Markus Armbruster 1 week ago
Max Reitz <mreitz@redhat.com> writes:

> On 30.07.20 11:16, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>>  qapi/block-core.json | 24 ++++++++++++------------
>>  qapi/ui.json         |  4 ++--
>>  2 files changed, 14 insertions(+), 14 deletions(-)
>> 
>> diff --git a/qapi/block-core.json b/qapi/block-core.json
>> index ab7bf3c612..bdcc8e5f9f 100644
>> --- a/qapi/block-core.json
>> +++ b/qapi/block-core.json
>> @@ -1847,8 +1847,8 @@
>>  #
>>  # Since: 4.0
>>  ##
>> -  { 'enum': 'BlockPermission',
>> -    'data': [ 'consistent-read', 'write', 'write-unchanged', 'resize',
>> +{ 'enum': 'BlockPermission',
>> +  'data': [ 'consistent-read', 'write', 'write-unchanged', 'resize',
>>                'graph-mod' ] }
>
> Do we want to keep the alignment at the opening parenthesis here?

Yes, we do.  Thanks!