[PATCH v2 02/23] qapi/misc-target: Wrap long 'SEV Attestation Report' long lines

Philippe Mathieu-Daudé posted 23 patches 4 years, 7 months ago
There is a newer version of this series
[PATCH v2 02/23] qapi/misc-target: Wrap long 'SEV Attestation Report' long lines
Posted by Philippe Mathieu-Daudé 4 years, 7 months ago
Wrap long lines before 70 characters for legibility.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Note: it would be nice if checkpatch enforce 70 char for json
      (or at least QAPI json), that would save future
      developer modifying QAPI definitions reformating time.
---
 qapi/misc-target.json | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/qapi/misc-target.json b/qapi/misc-target.json
index 5573dcf8f08..81646126267 100644
--- a/qapi/misc-target.json
+++ b/qapi/misc-target.json
@@ -290,8 +290,8 @@
 ##
 # @SevAttestationReport:
 #
-# The struct describes attestation report for a Secure Encrypted Virtualization
-# feature.
+# The struct describes attestation report for a Secure Encrypted
+# Virtualization feature.
 #
 # @data:  guest attestation report (base64 encoded)
 #
@@ -305,10 +305,11 @@
 ##
 # @query-sev-attestation-report:
 #
-# This command is used to get the SEV attestation report, and is supported on AMD
-# X86 platforms only.
+# This command is used to get the SEV attestation report, and is
+# supported on AMD X86 platforms only.
 #
-# @mnonce: a random 16 bytes value encoded in base64 (it will be included in report)
+# @mnonce: a random 16 bytes value encoded in base64 (it will be
+#          included in report)
 #
 # Returns: SevAttestationReport objects.
 #
@@ -316,10 +317,12 @@
 #
 # Example:
 #
-# -> { "execute" : "query-sev-attestation-report", "arguments": { "mnonce": "aaaaaaa" } }
+# -> { "execute" : "query-sev-attestation-report",
+                   "arguments": { "mnonce": "aaaaaaa" } }
 # <- { "return" : { "data": "aaaaaaaabbbddddd"} }
 #
 ##
-{ 'command': 'query-sev-attestation-report', 'data': { 'mnonce': 'str' },
+{ 'command': 'query-sev-attestation-report',
+  'data': { 'mnonce': 'str' },
   'returns': 'SevAttestationReport',
   'if': 'defined(TARGET_I386)' }
-- 
2.31.1

Re: [PATCH v2 02/23] qapi/misc-target: Wrap long 'SEV Attestation Report' long lines
Posted by Markus Armbruster 4 years, 5 months ago
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Wrap long lines before 70 characters for legibility.
>
> Suggested-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Markus Armbruster <armbru@redhat.com>

> ---
> Note: it would be nice if checkpatch enforce 70 char for json
>       (or at least QAPI json), that would save future
>       developer modifying QAPI definitions reformating time.

Yes.


Re: [PATCH v2 02/23] qapi/misc-target: Wrap long 'SEV Attestation Report' long lines
Posted by Markus Armbruster 4 years, 5 months ago
Markus Armbruster <armbru@redhat.com> writes:

> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>
>> Wrap long lines before 70 characters for legibility.
>>
>> Suggested-by: Markus Armbruster <armbru@redhat.com>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>

With the typo spotted by Dave fixed, of course.

>
>> ---
>> Note: it would be nice if checkpatch enforce 70 char for json
>>       (or at least QAPI json), that would save future
>>       developer modifying QAPI definitions reformating time.
>
> Yes.


Re: [PATCH v2 02/23] qapi/misc-target: Wrap long 'SEV Attestation Report' long lines
Posted by Dr. David Alan Gilbert 4 years, 7 months ago
* Philippe Mathieu-Daudé (philmd@redhat.com) wrote:
> Wrap long lines before 70 characters for legibility.
> 
> Suggested-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> Note: it would be nice if checkpatch enforce 70 char for json
>       (or at least QAPI json), that would save future
>       developer modifying QAPI definitions reformating time.
> ---
>  qapi/misc-target.json | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
> 
> diff --git a/qapi/misc-target.json b/qapi/misc-target.json
> index 5573dcf8f08..81646126267 100644
> --- a/qapi/misc-target.json
> +++ b/qapi/misc-target.json
> @@ -290,8 +290,8 @@
>  ##
>  # @SevAttestationReport:
>  #
> -# The struct describes attestation report for a Secure Encrypted Virtualization
> -# feature.
> +# The struct describes attestation report for a Secure Encrypted
> +# Virtualization feature.
>  #
>  # @data:  guest attestation report (base64 encoded)
>  #
> @@ -305,10 +305,11 @@
>  ##
>  # @query-sev-attestation-report:
>  #
> -# This command is used to get the SEV attestation report, and is supported on AMD
> -# X86 platforms only.
> +# This command is used to get the SEV attestation report, and is
> +# supported on AMD X86 platforms only.
>  #
> -# @mnonce: a random 16 bytes value encoded in base64 (it will be included in report)
> +# @mnonce: a random 16 bytes value encoded in base64 (it will be
> +#          included in report)
>  #
>  # Returns: SevAttestationReport objects.
>  #
> @@ -316,10 +317,12 @@
>  #
>  # Example:
>  #
> -# -> { "execute" : "query-sev-attestation-report", "arguments": { "mnonce": "aaaaaaa" } }
> +# -> { "execute" : "query-sev-attestation-report",
> +                   "arguments": { "mnonce": "aaaaaaa" } }

Shouldn't that start with a # ?
(Actually, last time I tried this command, I think I realised that we
should also put a real nonce value in there; it requirs a 16 byte value)

Dave

>  # <- { "return" : { "data": "aaaaaaaabbbddddd"} }
>  #
>  ##
> -{ 'command': 'query-sev-attestation-report', 'data': { 'mnonce': 'str' },
> +{ 'command': 'query-sev-attestation-report',
> +  'data': { 'mnonce': 'str' },
>    'returns': 'SevAttestationReport',
>    'if': 'defined(TARGET_I386)' }
> -- 
> 2.31.1
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK