All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qapi: Fix format of the memory-backend-file's @rom property doc comment
@ 2024-02-29 10:58 Stefano Garzarella
  2024-02-29 11:15 ` David Hildenbrand
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Garzarella @ 2024-02-29 10:58 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrangé, Markus Armbruster, Eduardo Habkost,
	Eric Blake, David Hildenbrand, Paolo Bonzini, Stefano Garzarella

Reflow paragraph following commit a937b6aa73 ("qapi: Reformat doc
comments to conform to current conventions"): use 4 spaces indentation,
70 columns width, and two spaces to separate sentences.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
---
 qapi/qom.json | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/qapi/qom.json b/qapi/qom.json
index 2a6e49365a..db1b0fdea2 100644
--- a/qapi/qom.json
+++ b/qapi/qom.json
@@ -668,19 +668,20 @@
 # @readonly: if true, the backing file is opened read-only; if false,
 #     it is opened read-write.  (default: false)
 #
-# @rom: whether to create Read Only Memory (ROM) that cannot be modified
-#       by the VM.  Any write attempts to such ROM will be denied.  Most
-#       use cases want writable RAM instead of ROM.  However, selected use
-#       cases, like R/O NVDIMMs, can benefit from ROM.  If set to 'on',
-#       create ROM; if set to 'off', create writable RAM;  if set to
-#       'auto', the value of the @readonly property is used.  This
-#       property is primarily helpful when we want to have proper RAM in
-#       configurations that would traditionally create ROM before this
-#       property was introduced: VM templating, where we want to open a
-#       file readonly (@readonly set to true) and mark the memory to be
-#       private for QEMU (@share set to false).  For this use case, we need
-#       writable RAM instead of ROM, and want to set this property to 'off'.
-#       (default: auto, since 8.2)
+# @rom: whether to create Read Only Memory (ROM) that cannot be
+#     modified by the VM.  Any write attempts to such ROM will be
+#     denied.  Most use cases want writable RAM instead of ROM.
+#     However, selected use cases, like R/O NVDIMMs, can benefit from
+#     ROM.  If set to 'on', create ROM; if set to 'off', create
+#     writable RAM; if set to 'auto', the value of the @readonly
+#     property is used.  This property is primarily helpful when we
+#     want to have proper RAM in configurations that would
+#     traditionally create ROM before this property was introduced: VM
+#     templating, where we want to open a file readonly (@readonly set
+#     to true) and mark the memory to be private for QEMU (@share set
+#     to false).  For this use case, we need writable RAM instead of
+#     ROM, and want to set this property to 'off'.  (default: auto,
+#     since 8.2)
 #
 # Since: 2.1
 ##
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] qapi: Fix format of the memory-backend-file's @rom property doc comment
  2024-02-29 10:58 [PATCH] qapi: Fix format of the memory-backend-file's @rom property doc comment Stefano Garzarella
@ 2024-02-29 11:15 ` David Hildenbrand
  2024-02-29 13:50   ` Markus Armbruster
  0 siblings, 1 reply; 3+ messages in thread
From: David Hildenbrand @ 2024-02-29 11:15 UTC (permalink / raw)
  To: Stefano Garzarella, qemu-devel
  Cc: Daniel P. Berrangé, Markus Armbruster, Eduardo Habkost,
	Eric Blake, Paolo Bonzini

On 29.02.24 11:58, Stefano Garzarella wrote:
> Reflow paragraph following commit a937b6aa73 ("qapi: Reformat doc
> comments to conform to current conventions"): use 4 spaces indentation,
> 70 columns width, and two spaces to separate sentences.
> 
> Suggested-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
> ---
>   qapi/qom.json | 27 ++++++++++++++-------------
>   1 file changed, 14 insertions(+), 13 deletions(-)
> 
> diff --git a/qapi/qom.json b/qapi/qom.json
> index 2a6e49365a..db1b0fdea2 100644
> --- a/qapi/qom.json
> +++ b/qapi/qom.json
> @@ -668,19 +668,20 @@
>   # @readonly: if true, the backing file is opened read-only; if false,
>   #     it is opened read-write.  (default: false)
>   #
> -# @rom: whether to create Read Only Memory (ROM) that cannot be modified
> -#       by the VM.  Any write attempts to such ROM will be denied.  Most
> -#       use cases want writable RAM instead of ROM.  However, selected use
> -#       cases, like R/O NVDIMMs, can benefit from ROM.  If set to 'on',
> -#       create ROM; if set to 'off', create writable RAM;  if set to
> -#       'auto', the value of the @readonly property is used.  This
> -#       property is primarily helpful when we want to have proper RAM in
> -#       configurations that would traditionally create ROM before this
> -#       property was introduced: VM templating, where we want to open a
> -#       file readonly (@readonly set to true) and mark the memory to be
> -#       private for QEMU (@share set to false).  For this use case, we need
> -#       writable RAM instead of ROM, and want to set this property to 'off'.
> -#       (default: auto, since 8.2)
> +# @rom: whether to create Read Only Memory (ROM) that cannot be
> +#     modified by the VM.  Any write attempts to such ROM will be
> +#     denied.  Most use cases want writable RAM instead of ROM.
> +#     However, selected use cases, like R/O NVDIMMs, can benefit from
> +#     ROM.  If set to 'on', create ROM; if set to 'off', create
> +#     writable RAM; if set to 'auto', the value of the @readonly
> +#     property is used.  This property is primarily helpful when we
> +#     want to have proper RAM in configurations that would
> +#     traditionally create ROM before this property was introduced: VM
> +#     templating, where we want to open a file readonly (@readonly set
> +#     to true) and mark the memory to be private for QEMU (@share set
> +#     to false).  For this use case, we need writable RAM instead of
> +#     ROM, and want to set this property to 'off'.  (default: auto,
> +#     since 8.2)
>   #
>   # Since: 2.1
>   ##

Ideally, we'd have a format checker that complains like checkpatch 
usually would.

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] qapi: Fix format of the memory-backend-file's @rom property doc comment
  2024-02-29 11:15 ` David Hildenbrand
@ 2024-02-29 13:50   ` Markus Armbruster
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2024-02-29 13:50 UTC (permalink / raw)
  To: David Hildenbrand
  Cc: Stefano Garzarella, qemu-devel, Daniel P. Berrangé,
	Eduardo Habkost, Eric Blake, Paolo Bonzini

David Hildenbrand <david@redhat.com> writes:

> On 29.02.24 11:58, Stefano Garzarella wrote:
>> Reflow paragraph following commit a937b6aa73 ("qapi: Reformat doc
>> comments to conform to current conventions"): use 4 spaces indentation,
>> 70 columns width, and two spaces to separate sentences.
>>
>> Suggested-by: Markus Armbruster <armbru@redhat.com>
>> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
>> ---
>>   qapi/qom.json | 27 ++++++++++++++-------------
>>   1 file changed, 14 insertions(+), 13 deletions(-)
>> diff --git a/qapi/qom.json b/qapi/qom.json
>> index 2a6e49365a..db1b0fdea2 100644
>> --- a/qapi/qom.json
>> +++ b/qapi/qom.json
>> @@ -668,19 +668,20 @@
>>  # @readonly: if true, the backing file is opened read-only; if false,
>>  #     it is opened read-write.  (default: false)
>>  #
>> -# @rom: whether to create Read Only Memory (ROM) that cannot be modified
>> -#       by the VM.  Any write attempts to such ROM will be denied.  Most
>> -#       use cases want writable RAM instead of ROM.  However, selected use
>> -#       cases, like R/O NVDIMMs, can benefit from ROM.  If set to 'on',
>> -#       create ROM; if set to 'off', create writable RAM;  if set to
>> -#       'auto', the value of the @readonly property is used.  This
>> -#       property is primarily helpful when we want to have proper RAM in
>> -#       configurations that would traditionally create ROM before this
>> -#       property was introduced: VM templating, where we want to open a
>> -#       file readonly (@readonly set to true) and mark the memory to be
>> -#       private for QEMU (@share set to false).  For this use case, we need
>> -#       writable RAM instead of ROM, and want to set this property to 'off'.
>> -#       (default: auto, since 8.2)
>> +# @rom: whether to create Read Only Memory (ROM) that cannot be
>> +#     modified by the VM.  Any write attempts to such ROM will be
>> +#     denied.  Most use cases want writable RAM instead of ROM.
>> +#     However, selected use cases, like R/O NVDIMMs, can benefit from
>> +#     ROM.  If set to 'on', create ROM; if set to 'off', create
>> +#     writable RAM; if set to 'auto', the value of the @readonly
>> +#     property is used.  This property is primarily helpful when we
>> +#     want to have proper RAM in configurations that would
>> +#     traditionally create ROM before this property was introduced: VM
>> +#     templating, where we want to open a file readonly (@readonly set
>> +#     to true) and mark the memory to be private for QEMU (@share set
>> +#     to false).  For this use case, we need writable RAM instead of
>> +#     ROM, and want to set this property to 'off'.  (default: auto,
>> +#     since 8.2)
>>   #
>>   # Since: 2.1
>>   ##
>
> Ideally, we'd have a format checker that complains like checkpatch usually would.

I agree!

A documentation pretty-printer would be best, but feels too hard.  reST
syntax is baroque, and our own extensions make it more so.

A checker catching common mistakes should be feasible.

Patches welcome :)

> Reviewed-by: David Hildenbrand <david@redhat.com>

Thanks!

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-29 13:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-29 10:58 [PATCH] qapi: Fix format of the memory-backend-file's @rom property doc comment Stefano Garzarella
2024-02-29 11:15 ` David Hildenbrand
2024-02-29 13:50   ` Markus Armbruster

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.